From 219c6adc58221df4f1cf6c7033d9fcbca1962411 Mon Sep 17 00:00:00 2001 From: Kenneth Rapp Date: Wed, 5 Jun 2024 07:50:24 -0500 Subject: [PATCH] Examples: SDL3+SDLRenderer3: Update SDL_SetRenderDrawColorFloat() call. (#7658) --- examples/example_sdl3_sdlrenderer3/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_sdl3_sdlrenderer3/main.cpp b/examples/example_sdl3_sdlrenderer3/main.cpp index baa7cd76e..98b9666ea 100644 --- a/examples/example_sdl3_sdlrenderer3/main.cpp +++ b/examples/example_sdl3_sdlrenderer3/main.cpp @@ -160,7 +160,7 @@ int main(int, char**) // Rendering ImGui::Render(); //SDL_RenderSetScale(renderer, io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y); - SDL_SetRenderDrawColor(renderer, (Uint8)(clear_color.x * 255), (Uint8)(clear_color.y * 255), (Uint8)(clear_color.z * 255), (Uint8)(clear_color.w * 255)); + SDL_SetRenderDrawColorFloat(renderer, clear_color.x, clear_color.y, clear_color.z, clear_color.w); SDL_RenderClear(renderer); ImGui_ImplSDLRenderer3_RenderDrawData(ImGui::GetDrawData(), renderer); SDL_RenderPresent(renderer);