From 89c16baf182aed201b75b99a253c0b074ffffeed Mon Sep 17 00:00:00 2001 From: Leandro Gabriel <45115495+VelocityIsNotSpeed@users.noreply.github.com> Date: Sat, 3 Aug 2019 06:07:41 -0300 Subject: Replace tabs with spaces and update year of copyright notices (#927) * Update year of copyright notices * Fix mistake in comment * Fix typo ("algorythms") * Replace tabs with spaces * Remove trailing whitespace and fix mistake in comment * Fix ExportImageAsCode missing comment rectangle corner * Replace tab with spaces * Replace tabs with spaces --- examples/shaders/shaders_texture_waves.c | 60 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'examples/shaders') diff --git a/examples/shaders/shaders_texture_waves.c b/examples/shaders/shaders_texture_waves.c index 07186d37..c0450361 100644 --- a/examples/shaders/shaders_texture_waves.c +++ b/examples/shaders/shaders_texture_waves.c @@ -33,38 +33,38 @@ int main(void) const int screenWidth = 800; const int screenHeight = 450; - InitWindow(screenWidth, screenHeight, "raylib [shaders] example - texture waves"); - + InitWindow(screenWidth, screenHeight, "raylib [shaders] example - texture waves"); + // Load texture texture to apply shaders - Texture2D texture = LoadTexture("resources/space.png"); - + Texture2D texture = LoadTexture("resources/space.png"); + // Load shader and setup location points and values Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/wave.fs", GLSL_VERSION)); - int secondsLoc = GetShaderLocation(shader, "secondes"); - int freqXLoc = GetShaderLocation(shader, "freqX"); - int freqYLoc = GetShaderLocation(shader, "freqY"); - int ampXLoc = GetShaderLocation(shader, "ampX"); - int ampYLoc = GetShaderLocation(shader, "ampY"); - int speedXLoc = GetShaderLocation(shader, "speedX"); - int speedYLoc = GetShaderLocation(shader, "speedY"); + int secondsLoc = GetShaderLocation(shader, "secondes"); + int freqXLoc = GetShaderLocation(shader, "freqX"); + int freqYLoc = GetShaderLocation(shader, "freqY"); + int ampXLoc = GetShaderLocation(shader, "ampX"); + int ampYLoc = GetShaderLocation(shader, "ampY"); + int speedXLoc = GetShaderLocation(shader, "speedX"); + int speedYLoc = GetShaderLocation(shader, "speedY"); // Shader uniform values that can be updated at any time - float freqX = 25.0f; - float freqY = 25.0f; - float ampX = 5.0f; - float ampY = 5.0f; - float speedX = 8.0f; - float speedY = 8.0f; + float freqX = 25.0f; + float freqY = 25.0f; + float ampX = 5.0f; + float ampY = 5.0f; + float speedX = 8.0f; + float speedY = 8.0f; float screenSize[2] = { (float)GetScreenWidth(), (float)GetScreenHeight() }; - SetShaderValue(shader, GetShaderLocation(shader, "size"), &screenSize, UNIFORM_VEC2); - SetShaderValue(shader, freqXLoc, &freqX, UNIFORM_FLOAT); - SetShaderValue(shader, freqYLoc, &freqY, UNIFORM_FLOAT); - SetShaderValue(shader, ampXLoc, &X, UNIFORM_FLOAT); - SetShaderValue(shader, ampYLoc, &Y, UNIFORM_FLOAT); - SetShaderValue(shader, speedXLoc, &speedX, UNIFORM_FLOAT); - SetShaderValue(shader, speedYLoc, &speedY, UNIFORM_FLOAT); + SetShaderValue(shader, GetShaderLocation(shader, "size"), &screenSize, UNIFORM_VEC2); + SetShaderValue(shader, freqXLoc, &freqX, UNIFORM_FLOAT); + SetShaderValue(shader, freqYLoc, &freqY, UNIFORM_FLOAT); + SetShaderValue(shader, ampXLoc, &X, UNIFORM_FLOAT); + SetShaderValue(shader, ampYLoc, &Y, UNIFORM_FLOAT); + SetShaderValue(shader, speedXLoc, &speedX, UNIFORM_FLOAT); + SetShaderValue(shader, speedYLoc, &speedY, UNIFORM_FLOAT); float seconds = 0.0f; @@ -76,9 +76,9 @@ int main(void) { // Update //---------------------------------------------------------------------------------- - seconds += GetFrameTime(); + seconds += GetFrameTime(); - SetShaderValue(shader, secondsLoc, &seconds, UNIFORM_FLOAT); + SetShaderValue(shader, secondsLoc, &seconds, UNIFORM_FLOAT); //---------------------------------------------------------------------------------- // Draw @@ -87,12 +87,12 @@ int main(void) ClearBackground(RAYWHITE); - BeginShaderMode(shader); + BeginShaderMode(shader); - DrawTexture(texture, 0, 0, WHITE); - DrawTexture(texture, texture.width, 0, WHITE); + DrawTexture(texture, 0, 0, WHITE); + DrawTexture(texture, texture.width, 0, WHITE); - EndShaderMode(); + EndShaderMode(); EndDrawing(); //---------------------------------------------------------------------------------- -- cgit v1.2.3