summaryrefslogtreecommitdiffhomepage
path: root/examples/core/core_vr_simulator.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-04-06 23:23:03 +0200
committerRay <[email protected]>2021-04-06 23:23:03 +0200
commitb3f75b91ff6859f5c19c4b1e6b17c78b5e66530f (patch)
treec476d384e41fb957e5cce5f1c5289ddeae4d06e5 /examples/core/core_vr_simulator.c
parent84d0d21f23a55d5f4aab9a9bba8ffa3091230248 (diff)
downloadraylib-b3f75b91ff6859f5c19c4b1e6b17c78b5e66530f.tar.gz
raylib-b3f75b91ff6859f5c19c4b1e6b17c78b5e66530f.zip
REDESIGNED: Vr stereo mode
Diffstat (limited to 'examples/core/core_vr_simulator.c')
-rw-r--r--examples/core/core_vr_simulator.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/examples/core/core_vr_simulator.c b/examples/core/core_vr_simulator.c
index ff303ae2..091b2fc9 100644
--- a/examples/core/core_vr_simulator.c
+++ b/examples/core/core_vr_simulator.c
@@ -101,19 +101,22 @@ int main(void)
ClearBackground(RAYWHITE);
- BeginVrStereoMode(target, config);
- BeginMode3D(camera);
+ BeginTextureMode(target);
+ ClearBackground(RAYWHITE);
+ BeginVrStereoMode(config);
+ BeginMode3D(camera);
- DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
- DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
+ DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
+ DrawCubeWires(cubePosition, 2.0f, 2.0f, 2.0f, MAROON);
- DrawGrid(40, 1.0f);
+ DrawGrid(40, 1.0f);
- EndMode3D();
- EndVrStereoMode();
+ EndMode3D();
+ EndVrStereoMode();
+ EndTextureMode();
BeginShaderMode(distortion);
- DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
+ DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
EndShaderMode();
DrawFPS(10, 10);