summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-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);