aboutsummaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2016-06-21 08:59:29 +0200
committerRay <raysan5@gmail.com>2016-06-21 08:59:29 +0200
commit6062201e8f543c227a0adbb77f3a0941772be889 (patch)
tree32233ad6ce270f1529b09528a922633ae7a09e75 /src/core.c
parentb01f5ff6a7e0d7a91057da618a688000eec6365d (diff)
downloadraylib-6062201e8f543c227a0adbb77f3a0941772be889.tar.gz
raylib-6062201e8f543c227a0adbb77f3a0941772be889.zip
Simplify Oculus example...
...to align it with standard raylib code. Final goal would be having the same code work for every platform with no changes...
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index eef81bad..af82e092 100644
--- a/src/core.c
+++ b/src/core.c
@@ -607,13 +607,14 @@ void Begin3dMode(Camera camera)
rlEnableDepthTest(); // Enable DEPTH_TEST for 3D
- //if (vrEnabled) BeginVrMode();
+ if (VrEnabled()) BeginOculusDrawing();
}
// Ends 3D mode and returns to default 2D orthographic mode
void End3dMode(void)
{
- rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
+ if (VrEnabled()) EndOculusDrawing();
+ else rlglDraw(); // Draw Buffers (Only OpenGL 3+ and ES2)
rlMatrixMode(RL_PROJECTION); // Switch to projection matrix
rlPopMatrix(); // Restore previous matrix (PROJECTION) from matrix stack