mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Oculus VR DK2 Support
- Updated to work with 0.5.x SDK - Uses Oculus Rendering rather than PostFX - Stereo rendering refactored so more rendering info is grabbed from the DisplayDevice - Implements an Offscreen Canvas for in-game gui with oculus - Message dialogs and metrics display can now go to the OffScreen Canvas (if oculus demo is setup correctly)
This commit is contained in:
parent
b3170bcddf
commit
3a457749ec
56 changed files with 2654 additions and 1426 deletions
|
|
@ -21,6 +21,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "math/util/frustum.h"
|
||||
#include "math/mathUtils.h"
|
||||
|
||||
#include "math/mMath.h"
|
||||
|
|
@ -1409,6 +1410,29 @@ void makeProjection( MatrixF *outMatrix,
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void makeFovPortFrustum(
|
||||
Frustum *outFrustum,
|
||||
bool isOrtho,
|
||||
F32 nearDist,
|
||||
F32 farDist,
|
||||
const FovPort &inPort,
|
||||
const MatrixF &transform)
|
||||
{
|
||||
F32 leftSize = nearDist * inPort.leftTan;
|
||||
F32 rightSize = nearDist * inPort.rightTan;
|
||||
F32 upSize = nearDist * inPort.upTan;
|
||||
F32 downSize = nearDist * inPort.downTan;
|
||||
|
||||
F32 left = -leftSize;
|
||||
F32 right = rightSize;
|
||||
F32 top = upSize;
|
||||
F32 bottom = -downSize;
|
||||
|
||||
outFrustum->set(isOrtho, left, right, top, bottom, nearDist, farDist, transform);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/// This is the special rotation matrix applied to
|
||||
/// projection matricies for GFX.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue