summaryrefslogtreecommitdiffhomepage
path: root/examples/shaders/shaders_custom_uniform.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/shaders/shaders_custom_uniform.c')
-rw-r--r--examples/shaders/shaders_custom_uniform.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/shaders/shaders_custom_uniform.c b/examples/shaders/shaders_custom_uniform.c
index 32fbab92..f898ac78 100644
--- a/examples/shaders/shaders_custom_uniform.c
+++ b/examples/shaders/shaders_custom_uniform.c
@@ -83,19 +83,21 @@ int main()
ClearBackground(RAYWHITE);
- BeginTextureMode(target); // Enable drawing to texture
+ BeginTextureMode(target); // Enable drawing to texture
+
+ ClearBackground(RAYWHITE); // Clear texture background
- BeginMode3D(camera);
+ BeginMode3D(camera); // Begin 3d mode drawing
DrawModel(model, position, 0.5f, WHITE); // Draw 3d model with texture
DrawGrid(10, 1.0f); // Draw a grid
- EndMode3D();
+ EndMode3D(); // End 3d mode drawing, returns to orthographic 2d mode
DrawText("TEXT DRAWN IN RENDER TEXTURE", 200, 10, 30, RED);
- EndTextureMode(); // End drawing to texture (now we have a texture available for next passes)
+ EndTextureMode(); // End drawing to texture (now we have a texture available for next passes)
BeginShaderMode(shader);
@@ -104,6 +106,7 @@ int main()
EndShaderMode();
+ // Draw some 2d text over drawn texture
DrawText("(c) Barracks 3D model by Alberto Cano", screenWidth - 220, screenHeight - 20, 10, GRAY);
DrawFPS(10, 10);