mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +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
|
|
@ -235,6 +235,7 @@ GameConnection::GameConnection()
|
|||
|
||||
GameConnection::~GameConnection()
|
||||
{
|
||||
setDisplayDevice(NULL);
|
||||
delete mAuthInfo;
|
||||
for(U32 i = 0; i < mConnectArgc; i++)
|
||||
dFree(mConnectArgv[i]);
|
||||
|
|
@ -673,6 +674,30 @@ bool GameConnection::getControlCameraTransform(F32 dt, MatrixF* mat)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool GameConnection::getControlCameraEyeTransforms(IDisplayDevice *display, MatrixF *transforms)
|
||||
{
|
||||
GameBase* obj = getCameraObject();
|
||||
if(!obj)
|
||||
return false;
|
||||
|
||||
GameBase* cObj = obj;
|
||||
while((cObj = cObj->getControlObject()) != 0)
|
||||
{
|
||||
if(cObj->useObjsEyePoint())
|
||||
obj = cObj;
|
||||
}
|
||||
|
||||
// Perform operation on left & right eyes. For each we need to calculate the world space
|
||||
// of the rotated eye offset and add that onto the camera world space.
|
||||
for (U32 i=0; i<2; i++)
|
||||
{
|
||||
obj->getEyeCameraTransform(display, i, &transforms[i]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool GameConnection::getControlCameraDefaultFov(F32 * fov)
|
||||
{
|
||||
//find the last control object in the chain (client->player->turret->whatever...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue