fillRect moved

This commit is contained in:
2025-12-19 18:22:26 +01:00
parent adf418dff9
commit 64fce596ce
2 changed files with 18 additions and 15 deletions

View File

@ -0,0 +1,16 @@
#pragma once
#include <SDL3/SDL.h>
namespace RenderPrimitives {
inline void fillRect(SDL_Renderer* renderer, float x, float y, float w, float h, SDL_Color color) {
if (!renderer) {
return;
}
SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, color.a);
SDL_FRect rect{x, y, w, h};
SDL_RenderFillRect(renderer, &rect);
}
} // namespace RenderPrimitives