aboutsummaryrefslogtreecommitdiff
path: root/examples/models
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2018-12-12 11:32:11 +0100
committerRay <raysan5@gmail.com>2018-12-12 11:32:11 +0100
commitc0c329b231dc44951827c00c1d58256e8a466596 (patch)
treee443f9643e9194f7a1af1efb4a4278867bddcee2 /examples/models
parent97e40ced57489f4d66d4b9bc9fe213c388e1a827 (diff)
downloadraylib-c0c329b231dc44951827c00c1d58256e8a466596.tar.gz
raylib-c0c329b231dc44951827c00c1d58256e8a466596.zip
Update models_rlgl_solar_system.c
Diffstat (limited to 'examples/models')
-rw-r--r--examples/models/models_rlgl_solar_system.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/examples/models/models_rlgl_solar_system.c b/examples/models/models_rlgl_solar_system.c
index 21fd30d5..7193d6f8 100644
--- a/examples/models/models_rlgl_solar_system.c
+++ b/examples/models/models_rlgl_solar_system.c
@@ -2,6 +2,8 @@
*
* raylib [models] example - rlgl module usage with push/pop matrix transformations
*
+* This example uses [rlgl] module funtionality (pseudo-OpenGL 1.1 style coding)
+*
* This example has been created using raylib 2.2 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
@@ -12,9 +14,14 @@
#include "raylib.h"
#include "rlgl.h"
-
+//------------------------------------------------------------------------------------
+// Module Functions Declaration
+//------------------------------------------------------------------------------------
void DrawSphereBasic(Color color); // Draw sphere without any matrix transformation
+//------------------------------------------------------------------------------------
+// Program main entry point
+//------------------------------------------------------------------------------------
int main()
{
// Initialization
@@ -98,11 +105,12 @@ int main()
rlPopMatrix();
// Some reference elements (not affected by previous matrix transformations)
- DrawCircle3D((Vector3){ 0.0f, 0.0f, 0.0f }, earthOrbitRadius, (Vector3){ 1, 0, 0 }, 90.0f, LIME);
+ DrawCircle3D((Vector3){ 0.0f, 0.0f, 0.0f }, earthOrbitRadius, (Vector3){ 1, 0, 0 }, 90.0f, Fade(RED, 0.5f));
DrawGrid(20, 1.0f);
EndMode3D();
+ DrawText("EARTH ORBITING AROUND THE SUN!", 400, 10, 20, MAROON);
DrawFPS(10, 10);
EndDrawing();
@@ -117,6 +125,10 @@ int main()
return 0;
}
+//--------------------------------------------------------------------------------------------
+// Module Functions Definitions (local)
+//--------------------------------------------------------------------------------------------
+
// Draw sphere without any matrix transformation
// NOTE: Sphere is drawn in world position ( 0, 0, 0 ) with radius 1.0f
void DrawSphereBasic(Color color)
@@ -153,4 +165,4 @@ void DrawSphereBasic(Color color)
}
}
rlEnd();
-} \ No newline at end of file
+}