Non-functional direct to rift

--HG--
branch : multipass-stereo
This commit is contained in:
kaetemi 2014-08-07 05:09:11 +02:00
parent aff0cab54e
commit 38a418503d

View file

@ -454,14 +454,30 @@ bool CStereoOVR::attachToDisplay()
m_Driver->getWindowPos(m_OriginalWinPosX, m_OriginalWinPosY); m_Driver->getWindowPos(m_OriginalWinPosX, m_OriginalWinPosY);
} }
UDriver::CMode mode; #if defined(NL_OS_WINDOWS)
mode.DisplayDevice = m_DevicePtr->DisplayDeviceName; if ((m_DevicePtr->HmdCaps & ovrHmdCap_ExtendDesktop) != ovrHmdCap_ExtendDesktop)
mode.Windowed = false; {
mode.Width = m_DevicePtr->Resolution.w; nldebug("OVR: Direct Rift");
mode.Height = m_DevicePtr->Resolution.h; CDriverUser *dru = static_cast<CDriverUser *>(m_Driver);
m_Driver->setMode(mode); IDriver *drv = dru->getDriver();
m_AttachedDisplay = true; m_AttachedDisplay = ovrHmd_AttachToWindow(m_DevicePtr, (void *)drv->getDisplay(), NULL, NULL);
return true; if (!m_AttachedDisplay)
nlwarning("OVR: Direct Rift failed!");
}
else
#endif
{
nldebug("OVR: Extended Rift");
UDriver::CMode mode;
mode.DisplayDevice = m_DevicePtr->DisplayDeviceName;
mode.Windowed = false;
mode.Width = m_DevicePtr->Resolution.w;
mode.Height = m_DevicePtr->Resolution.h;
m_Driver->setMode(mode);
m_AttachedDisplay = true;
}
return m_AttachedDisplay;
} }
void CStereoOVR::detachFromDisplay() void CStereoOVR::detachFromDisplay()