mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 08:14:48 +02:00
Don't use VR compositor if it doesn't exist
This commit is contained in:
parent
46326ed27c
commit
ff3d1b3d01
1 changed files with 6 additions and 2 deletions
|
@ -109,8 +109,12 @@ void releaseOpenVrSystem() {
|
|||
vr::Texture_t vrTexture{ (void*)INVALID_GL_TEXTURE_HANDLE, vr::API_OpenGL, vr::ColorSpace_Auto };
|
||||
static vr::VRTextureBounds_t OPENVR_TEXTURE_BOUNDS_LEFT{ 0, 0, 0.5f, 1 };
|
||||
static vr::VRTextureBounds_t OPENVR_TEXTURE_BOUNDS_RIGHT{ 0.5f, 0, 1, 1 };
|
||||
vr::VRCompositor()->Submit(vr::Eye_Left, &vrTexture, &OPENVR_TEXTURE_BOUNDS_LEFT);
|
||||
vr::VRCompositor()->Submit(vr::Eye_Right, &vrTexture, &OPENVR_TEXTURE_BOUNDS_RIGHT);
|
||||
|
||||
auto compositor = vr::VRCompositor();
|
||||
if (compositor) {
|
||||
compositor->Submit(vr::Eye_Left, &vrTexture, &OPENVR_TEXTURE_BOUNDS_LEFT);
|
||||
compositor->Submit(vr::Eye_Right, &vrTexture, &OPENVR_TEXTURE_BOUNDS_RIGHT);
|
||||
}
|
||||
|
||||
vr::VR_Shutdown();
|
||||
_openVrQuitRequested = false;
|
||||
|
|
Loading…
Reference in a new issue