From 5ecb6801fa5bf4f59a4459adfda922169523567f Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sun, 21 Sep 2014 14:26:42 +0200 Subject: Examples renaming and test examples merge Examples have been renamed for coherence with raylib modules and test examples have been merged into examples folder. --- examples/core_3d_mode.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'examples/core_3d_mode.c') 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 -- cgit v1.2.3