summaryrefslogtreecommitdiffhomepage
path: root/examples/shaders/shaders_basic_lighting.c
diff options
context:
space:
mode:
authorRay <[email protected]>2020-03-03 01:21:06 +0100
committerRay <[email protected]>2020-03-03 01:21:06 +0100
commita6297a2be12412ebec498b9a919b7a92f876ec46 (patch)
treebd76033a4f23e22e16ecf9a7f1bb1bf78a0a4e19 /examples/shaders/shaders_basic_lighting.c
parent8724cf2ea523b6cf26a5b2217c54c65673db5cb2 (diff)
downloadraylib-a6297a2be12412ebec498b9a919b7a92f876ec46.tar.gz
raylib-a6297a2be12412ebec498b9a919b7a92f876ec46.zip
Some code tweaks
Diffstat (limited to 'examples/shaders/shaders_basic_lighting.c')
-rw-r--r--examples/shaders/shaders_basic_lighting.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/shaders/shaders_basic_lighting.c b/examples/shaders/shaders_basic_lighting.c
index a5bb145a..21883efa 100644
--- a/examples/shaders/shaders_basic_lighting.c
+++ b/examples/shaders/shaders_basic_lighting.c
@@ -112,7 +112,7 @@ int main(void)
UpdateCamera(&camera); // Update camera
// Make the lights do differing orbits
- angle -= 0.02;
+ angle -= 0.02f;
lights[0].position.x = cosf(angle)*4.0f;
lights[0].position.z = sinf(angle)*4.0f;
lights[1].position.x = cosf(-angle*0.6f)*4.0f;
@@ -128,8 +128,8 @@ int main(void)
UpdateLightValues(shader, lights[3]);
// Rotate the torus
- modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateX(-0.025));
- modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateZ(0.012));
+ modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateX(-0.025f));
+ modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateZ(0.012f));
// Update the light shader with the camera view position
float cameraPos[3] = { camera.position.x, camera.position.y, camera.position.z };
@@ -161,7 +161,7 @@ int main(void)
DrawFPS(10, 10);
- DrawText("Keys RGB & W toggle lights", 10, 30, 20, DARKGRAY);
+ DrawText("Use keys RGBW to toggle lights", 10, 30, 20, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------