SDL_RenderRects(3)
β¨ SDL_RenderRects(3) β¨
okay bestie, welcome to the SDL3 FUNCTIONS page for SDL_RenderRects π this is the one in <SDL3/SDL_render.h>, and she is that girl.
π NAME π
SDL_RenderRects β draw some number of rectangles on the current rendering target, at subpixel precision π
like. not one rectangle. some number of them. a whole lil squad. and they're subpixel-precise so they land exactly where you meant, no cap.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_render.h>
bool SDL_RenderRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count);
look at her. three args. zero drama. π
π¦ FUNCTION PARAMETERS π¦
rendererβ the renderer which should draw multiple rectangles. this is your main character, the one doing the actual drawing π«Άrectsβ a pointer to an array of destination rectangles. yes bestie, an array, that's the whole point of the "Rects" part πcountβ the number of rectangles. how many of them from that array are getting drawn. tell her the number or she's just guessing fr fr
π RETURN VALUE π
Returns true on success or false on failure π
and if it fails? call SDL_GetError() for more information β she will tell you exactly what went wrong, go ask her, don't just sit there spiraling π
π§ THREAD SAFETY π§
This function should only be called on the main thread. π¨
main thread only, periodt. don't be out here calling her from some random thread, that's not the vibe check you want to fail π
β AVAILABILITY β
This function is available since SDL 3.2.0 β¨ so if you're on something older, that's why she's not picking up the phone.
π SEE ALSO π
SDL_RenderRect(3)β the singular sister. one rectangle instead of many, iykyk π
kisses, and go draw some rectangles bestie, you got this πβ¨ππ¦πΈπ π«Ά
this page is brought to you by the fine folks at Simple Directmedia Layer, living in SDL 3.4.18 β and she is iconic, no notes πβπ₯π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms