Examples: SDL3+SDLRenderer3: Update SDL_SetRenderDrawColorFloat() call. (#7658)

This commit is contained in:
Kenneth Rapp 2024-06-05 07:50:24 -05:00 committed by GitHub
parent b95b2b4574
commit 219c6adc58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,7 +160,7 @@ int main(int, char**)
// Rendering // Rendering
ImGui::Render(); ImGui::Render();
//SDL_RenderSetScale(renderer, io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y); //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); SDL_RenderClear(renderer);
ImGui_ImplSDLRenderer3_RenderDrawData(ImGui::GetDrawData(), renderer); ImGui_ImplSDLRenderer3_RenderDrawData(ImGui::GetDrawData(), renderer);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);