aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/core_oculus_rift.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/examples/core_oculus_rift.c b/examples/core_oculus_rift.c
index 3c9d7840..32e6b1c6 100644
--- a/examples/core_oculus_rift.c
+++ b/examples/core_oculus_rift.c
@@ -51,27 +51,31 @@ int main()
ClearBackground(RAYWHITE);
- BeginOculusDrawing();
+ Begin3dMode(camera);
+ //BeginOculusDrawing(camera); // Add it to Begin3dMode() ?
- for (int eye = 0; eye < 2; eye++)
- {
- // TODO: Probably projection and view matrices could be created here...
- // ...without the need to create it internally through Begin3dMode()
- Begin3dMode(camera);
+ for (int eye = 0; eye < 2; eye++)
+ {
+ // TODO: Probably projection and view matrices could be created here...
+ // ...without the need to create it internally through Begin3dMode()
+ //Begin3dMode(camera);
+
+ SetOculusView(eye);
+
+ DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
+ DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
+
+ DrawGrid(10, 1.0f);
+
+ // TODO: Call internal buffers drawing directly (rlglDraw()) and...
+ // ...reset internal matrices, instead of letting End3dMode() do that
+ //End3dMode();
- SetOculusMatrix(eye);
-
- DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
- DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
-
- DrawGrid(10, 1.0f);
-
- // TODO: Call internal buffers drawing directly (rlglDraw()) and...
- // ...reset internal matrices, instead of letting End3dMode() do that
- End3dMode();
- }
+ DrawDefaultBuffers(); // Process internal dynamic buffers
+ }
- EndOculusDrawing();
+ End3dMode();
+ //EndOculusDrawing(); // Add it to End3dMode() ?
EndDrawing();
//----------------------------------------------------------------------------------