mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Baseline working openvr code
This commit is contained in:
parent
e239d106f5
commit
ba91478fad
23 changed files with 1463 additions and 457 deletions
|
|
@ -62,7 +62,7 @@ MODULE_END;
|
|||
// OculusVRDevice
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool OculusVRDevice::smEnableDevice = true;
|
||||
bool OculusVRDevice::smEnableDevice = false;
|
||||
|
||||
bool OculusVRDevice::smSimulateHMD = true;
|
||||
|
||||
|
|
@ -318,17 +318,6 @@ void OculusVRDevice::getEyeOffsets(Point3F *dest) const
|
|||
hmd->getEyeOffsets(dest);
|
||||
}
|
||||
|
||||
bool OculusVRDevice::providesFovPorts() const
|
||||
{
|
||||
if(!mHMDDevices.size())
|
||||
return false;
|
||||
|
||||
const OculusVRHMDDevice* hmd = getHMDDevice(mActiveDeviceId);
|
||||
if(!hmd)
|
||||
return Point3F::Zero;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OculusVRDevice::getFovPorts(FovPort *out) const
|
||||
{
|
||||
|
|
@ -562,6 +551,20 @@ GameConnection* OculusVRDevice::getCurrentConnection()
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
GFXTexHandle OculusVRDevice::getPreviewTexture()
|
||||
{
|
||||
if (!mHMDDevices.size())
|
||||
return NULL;
|
||||
|
||||
OculusVRHMDDevice* hmd = getHMDDevice(mActiveDeviceId);
|
||||
if (!hmd)
|
||||
return NULL;
|
||||
|
||||
return hmd->getPreviewTexture();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DefineEngineFunction(isOculusVRDeviceActive, bool, (),,
|
||||
"@brief Used to determine if the Oculus VR input device is active\n\n"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue