diff options
Diffstat (limited to 'examples/models/models_skybox.c')
| -rw-r--r-- | examples/models/models_skybox.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c index d12cc557..34616de5 100644 --- a/examples/models/models_skybox.c +++ b/examples/models/models_skybox.c @@ -38,7 +38,12 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [models] example - skybox loading and drawing"); // Define the camera to look into our 3d world - Camera camera = { { 1.0f, 1.0f, 1.0f }, { 4.0f, 1.0f, 4.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 }; + Camera camera = { 0 }; + camera.position = (Vector3){ 1.0f, 1.0f, 1.0f }; // Camera position + camera.target = (Vector3){ 4.0f, 1.0f, 4.0f }; // Camera looking at point + camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) + camera.fovy = 45.0f; // Camera field-of-view Y + camera.projection = CAMERA_PERSPECTIVE; // Camera projection type // Load skybox model Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f); @@ -87,12 +92,13 @@ int main(void) UnloadImage(img); } - DisableCursor(); // Catch cursor - SetTargetFPS(60); // Set our game to run at 60 frames-per-second + DisableCursor(); // Limit cursor to relative movement inside the window + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- // Main game loop - while (!WindowShouldClose()) // Detect window close button or ESC key + while (!WindowShouldClose()) // Detect window close button or ESC key { // Update //---------------------------------------------------------------------------------- |
