aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-01-13 18:11:11 +0100
committerraysan5 <raysan5@gmail.com>2016-01-13 18:11:11 +0100
commit4f0165f32dc3f04cd58c013743e51384b7b932ab (patch)
tree81a1d3db113e42ce41dbfde5f73c69aa6ea46d02 /examples
parentfb6ef2c2f4fe22552908d339cda541453e43faec (diff)
downloadraylib-4f0165f32dc3f04cd58c013743e51384b7b932ab.tar.gz
raylib-4f0165f32dc3f04cd58c013743e51384b7b932ab.zip
Example reviewed (more clear now)
Diffstat (limited to 'examples')
-rw-r--r--examples/core_3d_mode.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/core_3d_mode.c b/examples/core_3d_mode.c
index c38da256..3a5fae13 100644
--- a/examples/core_3d_mode.c
+++ b/examples/core_3d_mode.c
@@ -21,11 +21,14 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d mode");
// Define the camera to look into our 3d world
- Camera camera = {{ 0.0, 10.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }};
+ Camera camera;
+ camera.position = (Vector3){ 0.0, 10.0, 10.0 };
+ camera.target = (Vector3){ 0.0, 0.0, 0.0 };
+ camera.up = (Vector3){ 0.0, 1.0, 0.0 };
Vector3 cubePosition = { 0.0, 0.0, 0.0 };
- //SetTargetFPS(60); // Set our game to run at 60 frames-per-second, but not now...
+ SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
@@ -40,12 +43,12 @@ int main()
//----------------------------------------------------------------------------------
BeginDrawing();
- ClearBackground(WHITE);
+ ClearBackground(RAYWHITE);
Begin3dMode(camera);
- DrawCube(cubePosition, 2, 2, 2, RED);
- DrawCubeWires(cubePosition, 2, 2, 2, MAROON);
+ DrawCube(cubePosition, 2.0, 2.0, 2.0, RED);
+ DrawCubeWires(cubePosition, 2.0, 2.0, 2.0, MAROON);
DrawGrid(10.0, 1.0);