From 65f28460a14dbf8c537ec361a60c37100439f4a2 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 22 Mar 2022 23:53:32 +0100 Subject: [PATCH] Update shaders_raymarching.c --- examples/shaders/shaders_raymarching.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/shaders/shaders_raymarching.c b/examples/shaders/shaders_raymarching.c index ad2e6285..68fbd30c 100644 --- a/examples/shaders/shaders_raymarching.c +++ b/examples/shaders/shaders_raymarching.c @@ -77,9 +77,7 @@ int main(void) // Check if screen is resized if (IsWindowResized()) { - screenWidth = GetScreenWidth(); - screenHeight = GetScreenHeight(); - float resolution[2] = { (float)screenWidth, (float)screenHeight }; + float resolution[2] = { (float)GetScreenWidth(), (float)GetScreenHeight() }; SetShaderValue(shader, resolutionLoc, resolution, SHADER_UNIFORM_VEC2); } //---------------------------------------------------------------------------------- @@ -93,10 +91,10 @@ int main(void) // We only draw a white full-screen rectangle, // frame is generated in shader using raymarching BeginShaderMode(shader); - DrawRectangle(0, 0, screenWidth, screenHeight, WHITE); + DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE); EndShaderMode(); - DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", screenWidth - 280, screenHeight - 20, 10, BLACK); + DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", GetScreenWidth() - 280, GetScreenHeight() - 20, 10, BLACK); EndDrawing(); //----------------------------------------------------------------------------------