SDL_RenderPoints(3)

πŸ’– SDL_RenderPoints πŸ’–

okay bestie, so this one lives in the SDL3 FUNCTIONS fam and it's literally called SDL_RenderPoints β€” yes, plural, because we're drawing a whole bunch of points, not just one 🫢


✨ NAME ✨

SDL_RenderPoints β€” Draw multiple points on the current rendering target at subpixel precision.

no cap, "subpixel precision" is the moment here, we love a renderer that doesn't snap to whole pixels 🌸


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_render.h>

bool SDL_RenderPoints(SDL_Renderer *renderer, const SDL_FPoint *points, int count);

look at that signature. iconic. πŸ’…


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • renderer β€” the renderer which should draw multiple points. this is the one doing the actual slaying.
  • points β€” the points to draw. yes girl, all of them.
  • count β€” the number of points to draw. the way that this tells the function how many of points to actually care about… obsessed.

⭐ RETURN VALUE ⭐

Returns true on success or false on failure πŸ₯² and if it's giving failure, call SDL_GetError() for more information. she'll tell you what went wrong, fr fr.


🌈 THREAD SAFETY 🌈

This function should only be called on the main thread. no side-quest threads for this one, bestie. main character energy only πŸ‘‘

πŸ’œ AVAILABILITY πŸ’œ

This function is available since SDL 3.2.0. so if you're on something older… it's not there, and that's on that πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

  • SDL_RenderPoint(3) β€” the singular version, for when you just need one point and not the whole friend group ✨

Simple Directmedia Layer wrote this one, and it's coming at you from SDL 3.4.18 πŸŽ€ tysm for reading bestie, go draw some points, ily, mwah πŸ’–πŸ§šπŸŒΈ

πŸ“¦ where this page comes from