mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-25 13:31:10 +00:00
OpenXR recenter after the first frame
This commit is contained in:
parent
5ecbbac97e
commit
5068ce7199
1 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,7 @@ extern cvar_t *vr_heightAdjust;
|
|||
|
||||
XrView* projections;
|
||||
GLboolean stageSupported = GL_FALSE;
|
||||
GLboolean needRecenter = GL_FALSE;
|
||||
|
||||
void VR_UpdateStageBounds(ovrApp* pappState) {
|
||||
XrExtent2Df stageBounds = {};
|
||||
|
@ -287,6 +288,7 @@ void VR_InitRenderer( engine_t* engine ) {
|
|||
|
||||
if (engine->appState.CurrentSpace == XR_NULL_HANDLE) {
|
||||
VR_Recenter(engine);
|
||||
needRecenter = GL_TRUE;
|
||||
}
|
||||
|
||||
projections = (XrView*)(malloc(ovrMaxNumEyes * sizeof(XrView)));
|
||||
|
@ -534,4 +536,9 @@ void VR_DrawFrame( engine_t* engine ) {
|
|||
OXR(xrEndFrame(engine->appState.Session, &endFrameInfo));
|
||||
frameBuffer->TextureSwapChainIndex++;
|
||||
frameBuffer->TextureSwapChainIndex %= frameBuffer->TextureSwapChainLength;
|
||||
|
||||
if (needRecenter) {
|
||||
VR_Recenter(engine);
|
||||
needRecenter = GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue