From c0c329b231dc44951827c00c1d58256e8a466596 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 12 Dec 2018 11:32:11 +0100 Subject: [PATCH] Update models_rlgl_solar_system.c --- examples/models/models_rlgl_solar_system.c | 18 +++++++++++++++--- 1 file 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 +}