SDL_RenderPoint(3)

πŸ’… SDL_RenderPoint(3) β€” the SDL3 function that draws u a single lil point

okay bestie, welcome to the SDL3 FUNCTIONS page for SDL_RenderPoint. this is the one that draws one point on the current rendering target, at subpixel precision. one point. that's it. that's the whole job. and honestly? iconic for it. ✨


🌸 NAME 🌸

SDL_RenderPoint β€” draws a point on the current rendering target, and it does it at subpixel precision πŸ’–


✨ SYNOPSIS ✨

#include <SDL3/SDL_render.h>

bool SDL_RenderPoint(SDL_Renderer *renderer, float x, float y);

look at her. clean. simple. three args. no drama. πŸŽ€


🫢 FUNCTION PARAMETERS 🫢

  • renderer β€” the renderer that should draw the point. it's the one holding the pen, basically. πŸ–ŠοΈ
  • x β€” the x coordinate of the point. yes it's a float, that's the subpixel thing, we love precision in this house. πŸ’…
  • y β€” the y coordinate of the point. same deal, float, same energy. ⭐

πŸ¦‹ RETURN VALUE πŸ¦‹

returns true when it slays (success) or false when it doesn't (failure) 😭 β€” and if it's giving failure, call SDL_GetError() for more info, she'll tell u what went wrong. fr fr.


πŸ’€ THREAD SAFETY πŸ’€

this function should only be called on the main thread. no side-quest threads, no multitasking, no exceptions. main thread or nothing, bestie. 🚫🧡

🌈 AVAILABILITY 🌈

this one's been around since SDL 3.2.0. vintage-ish but still fresh. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

  • SDL_RenderPoints(3) β€” for when one point just isn't enough and u need the whole squad. πŸ’–βœ¨

and that's the whole page, no cap. this gem lives in the Simple Directmedia Layer collection, version SDL 3.4.18, and it came straight from the SDL_RenderPoint(3) corner of the SDL 3 docs. go draw a point, main character. πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from