aboutsummaryrefslogtreecommitdiff
path: root/examples/core_3d_mode.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2014-09-21 14:26:42 +0200
committerraysan5 <raysan5@gmail.com>2014-09-21 14:26:42 +0200
commit5ecb6801fa5bf4f59a4459adfda922169523567f (patch)
tree0516a772c0efaccfb9980b5d6620b903ffddc1b2 /examples/core_3d_mode.c
parent3a0d164a768a7c4ec1e5f56ddfc005182f8a86eb (diff)
downloadraylib-5ecb6801fa5bf4f59a4459adfda922169523567f.tar.gz
raylib-5ecb6801fa5bf4f59a4459adfda922169523567f.zip
Examples renaming and test examples merge
Examples have been renamed for coherence with raylib modules and test examples have been merged into examples folder.
Diffstat (limited to 'examples/core_3d_mode.c')
-rw-r--r--examples/core_3d_mode.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/examples/core_3d_mode.c b/examples/core_3d_mode.c
index 984f3fea..e62247f6 100644
--- a/examples/core_3d_mode.c
+++ b/examples/core_3d_mode.c
@@ -1,11 +1,11 @@
/*******************************************************************************************
*
-* raylib example 07a - Initialize 3d mode
+* raylib [core] example - Initialize 3d mode
*
* This example has been created using raylib 1.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
-* Copyright (c) 2013 Ramon Santamaria (Ray San - raysan@raysanweb.com)
+* Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
*
********************************************************************************************/
@@ -18,11 +18,14 @@ int main()
int screenWidth = 800;
int screenHeight = 450;
- Vector3 position = { 0.0, 0.0, 0.0 };
-
+ 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 }};
-
- InitWindow(screenWidth, screenHeight, "raylib example 07a - 3d mode");
+
+ Vector3 cubePosition = { 0.0, 0.0, 0.0 };
+
+ //SetTargetFPS(60); // Set our game to run at 60 frames-per-second, but not now...
//--------------------------------------------------------------------------------------
// Main game loop
@@ -41,7 +44,8 @@ int main()
Begin3dMode(camera);
- DrawCube(position, 2, 2, 2, RED);
+ DrawCube(cubePosition, 2, 2, 2, RED);
+ DrawCubeWires(cubePosition, 2, 2, 2, MAROON);
DrawGrid(10.0, 1.0);
@@ -61,4 +65,4 @@ int main()
//--------------------------------------------------------------------------------------
return 0;
-}
+} \ No newline at end of file