mirror of https://github.com/bkaradzic/bgfx
Fixes extra frame of latency with oculus
* fix oculus latency w/ ordering of eye commits
This commit is contained in:
parent
e3b71511ac
commit
0b73864140
|
@ -56,6 +56,17 @@ function bgfxProject(_name, _kind, _defines)
|
|||
includedirs {
|
||||
"$(OVR_DIR)/LibOVR/Include",
|
||||
}
|
||||
|
||||
configuration { "x32" }
|
||||
libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/Win32/Release", _ACTION) }
|
||||
|
||||
configuration { "x64" }
|
||||
libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Windows/x64/Release", _ACTION) }
|
||||
|
||||
configuration { "x32 or x64" }
|
||||
links { "libovr" }
|
||||
|
||||
configuration {}
|
||||
end
|
||||
|
||||
configuration { "Debug" }
|
||||
|
|
|
@ -144,6 +144,13 @@ namespace bgfx
|
|||
_hmd.deviceHeight = m_hmdDesc.Resolution.h;
|
||||
}
|
||||
|
||||
// commit eyes to HMD
|
||||
for (int eye = 0; eye < 2; eye++)
|
||||
{
|
||||
commitEye(eye);
|
||||
}
|
||||
|
||||
// check that eyes committed successfully
|
||||
if (!m_isenabled || !OVR_SUCCESS(m_hmdFrameReady))
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -5077,8 +5077,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
if (m_ovr.isEnabled() )
|
||||
{
|
||||
m_ovr.getViewport(eye, &viewState.m_rect);
|
||||
// commit previous eye to HMD and start rendering new frame
|
||||
m_ovr.commitEye(eye);
|
||||
m_ovr.renderEyeStart(eye);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue