SDL_RenderDebugTextFormat(3)
π SDL_RenderDebugTextFormat(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one is literally called SDL_RenderDebugTextFormat and it's giving "quick and dirty debug text but make it printf" β¨
πΈ NAME πΈ
SDL_RenderDebugTextFormat β draws debug text onto an SDL_Renderer. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_render.h>
bool SDL_RenderDebugTextFormat(SDL_Renderer *renderer, float x, float y, const char *fmt, ...);
π¦ DESCRIPTION π¦
so what this function does is render a printf()-style format string straight to a renderer. cute right? π«Ά
BUT β and I need you to hear me on this one β this is a convenience function for debugging, it has severe limitations, and it is not intended to be used for production apps and games. no cap. do not ship this. π
if you want the full list of limitations and other useful info, go read SDL_RenderDebugText. it's all there, iykyk π
π FUNCTION PARAMETERS π
rendererβ the renderer that should draw the text. she's the main character, she does the drawing π¨xβ the x coordinate where the top-left corner of the text will draw πyβ the y coordinate where the top-left corner of the text will draw π (yes bestie, same deal, just the other axis)fmtβ the format string to draw βοΈ...β the additional parameters matching%tokens in thefmtstring, if there are any. only if any. periodt π
π RETURN VALUE π
returns true on success or false on failure. if it fails, call SDL_GetError() for more info β she will tell you what went wrong, fr fr π
π§ THREAD SAFETY π§
this function should only be called on the main thread. don't be out here passing it around to your other threads, that's not the move π
β AVAILABILITY β
this function is available since SDL 3.2.0 π
π₯ SEE ALSO π₯
k bye bestie, go draw some debug text, just don't put it in prod π«Ά
Simple Directmedia Layer β SDL 3.4.18 β SDL_RenderDebugTextFormat(3) β¨ that's the source, the version and the date, mwah, slay, 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