OpenXR minor fixes

This commit is contained in:
Lubos 2022-04-24 20:25:19 +02:00
parent 249847930b
commit 5947168966
3 changed files with 3 additions and 4 deletions

View file

@ -234,7 +234,6 @@ void QuatToYawPitchRoll(XrQuaternionf q, vec3_t rotation, vec3_t out) {
//0 = left, 1 = right
float vibration_channel_duration[2] = {0.0f, 0.0f};
float vibration_channel_intensity[2] = {0.0f, 0.0f};
//TODO:ovrDeviceID controllerIDs[2];
void VR_Vibrate( int duration, int chan, float intensity )
{

View file

@ -295,8 +295,6 @@ void VR_DrawFrame( engine_t* engine ) {
30.0f, 30.0f, 0.0f, 0.0f, 1.0f, 0.0f );
const ovrMatrix4f projectionMatrix = ovrMatrix4f_CreateProjectionFov(
vr.fov_x / vr.weapon_zoomLevel, vr.fov_y / vr.weapon_zoomLevel, 0.0f, 0.0f, 1.0f, 0.0f );
re.SetVRHeadsetParms(projectionMatrix.M, monoVRMatrix.M,
engine->appState.Renderer.FrameBuffer.FrameBuffers[engine->appState.Renderer.FrameBuffer.TextureSwapChainIndex]);
GLboolean stageBoundsDirty = GL_TRUE;
ovrApp_HandleXrEvents(&engine->appState);
@ -394,6 +392,8 @@ void VR_DrawFrame( engine_t* engine ) {
ovrFramebuffer* frameBuffer = &engine->appState.Renderer.FrameBuffer;
ovrFramebuffer_Acquire(frameBuffer);
ovrFramebuffer_SetCurrent(frameBuffer);
re.SetVRHeadsetParms(projectionMatrix.M, monoVRMatrix.M,
engine->appState.Renderer.FrameBuffer.FrameBuffers[engine->appState.Renderer.FrameBuffer.TextureSwapChainIndex]);
Com_Frame();
ovrFramebuffer_Resolve(frameBuffer);
ovrFramebuffer_Release(frameBuffer);

View file

@ -287,7 +287,7 @@ void ovrRenderer_Create(
ovrFramebuffer_Create(
session,
&renderer->FrameBuffer,
GL_SRGB8_ALPHA8,
GL_RGBA8,
suggestedEyeTextureWidth,
suggestedEyeTextureHeight,
NUM_MULTI_SAMPLES);