Improving Oculus Rift example...

Under design... looking for the easiest and most comprehensive way for
the user to use VR...
This commit is contained in:
Ray 2016-06-17 13:54:45 +02:00
parent 9fdf4420d5
commit 24c9b1f717
5 changed files with 40 additions and 25 deletions

View file

@ -606,6 +606,8 @@ void Begin3dMode(Camera camera)
rlMultMatrixf(MatrixToFloat(cameraView)); // Multiply MODELVIEW matrix by view matrix (camera)
rlEnableDepthTest(); // Enable DEPTH_TEST for 3D
//if (vrEnabled) BeginVrMode();
}
// Ends 3D mode and returns to default 2D orthographic mode
@ -1015,6 +1017,14 @@ Matrix GetCameraMatrix(Camera camera)
return MatrixLookAt(camera.position, camera.target, camera.up);
}
// Update and draw default buffers vertex data
// NOTE: This data has been stored dynamically during frame on each Draw*() call
void DrawDefaultBuffers(void)
{
rlglUpdateDefaultBuffers(); // Upload frame vertex data to GPU
rlglDrawDefaultBuffers(); // Draw vertex data into framebuffer
}
//----------------------------------------------------------------------------------
// Module Functions Definition - Input (Keyboard, Mouse, Gamepad) Functions
//----------------------------------------------------------------------------------