From 03d9583b945dcf17d6a93ed97deeb9f9721284b5 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 21 Jun 2016 13:49:13 +0200 Subject: Add oculus simulator (in case device is not detected) --- src/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core.c') diff --git a/src/core.c b/src/core.c index af82e092..1073ae6a 100644 --- a/src/core.c +++ b/src/core.c @@ -607,14 +607,15 @@ void Begin3dMode(Camera camera) rlEnableDepthTest(); // Enable DEPTH_TEST for 3D - if (VrEnabled()) BeginOculusDrawing(); + if (IsOculusReady()) BeginOculusDrawing(); } // Ends 3D mode and returns to default 2D orthographic mode void End3dMode(void) { - if (VrEnabled()) EndOculusDrawing(); - else rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2) + if (IsOculusReady()) EndOculusDrawing(); + + rlglDraw(); // Process internal buffers (update + draw) rlMatrixMode(RL_PROJECTION); // Switch to projection matrix rlPopMatrix(); // Restore previous matrix (PROJECTION) from matrix stack -- cgit v1.2.3