TTF_SETGPUTEXTENGINEWINDING(3)

πŸ’– TTF_SetGPUTextEngineWinding(3) πŸ’–

okay bestie, sit down, hydrate, because we're talking about SDL_ttf3 β€” specifically a little function from the FUNCTIONS section of the SDL_ttf manual, third edition. it's giving "underrated icon that fixes your weird backwards polygons" energy ✨


🌸 NAME 🌸

TTF_SetGPUTextEngineWinding β€” sets the winding order of the vertices returned by TTF_GetGPUTextDrawData for a particular GPU text engine. no cap, that's literally the whole job πŸŽ€


πŸ¦‹ HEADER FILE πŸ¦‹

it lives right here, bestie:

Defined in SDL3_ttf/SDL_ttf.h


✨ SYNOPSIS ✨

#include "SDL3_ttf/SDL_ttf.h"

void TTF_SetGPUTextEngineWinding(TTF_TextEngine *engine, TTF_GPUTextEngineWinding winding);

look at that signature. two args. no return value. she's a void queen and she knows it πŸ’…


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • engine β€” a TTF_TextEngine object created with TTF_CreateGPUTextEngine(). so like, you gotta actually make the engine first, you can't just show up with nothing 🫢
  • winding β€” the new winding order option. this is a TTF_GPUTextEngineWinding, and it's the whole point of the call.

πŸ”₯ THREAD SAFETY πŸ”₯

lowkey important: this function should be called on the thread that created the engine. not a different thread. the same one. iykyk 😭

🌈 AVAILABILITY 🌈

this function is available since SDL_ttf 3.0.0. so if you're on something older… bestie, upgrade πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

(the getter! the girlies love a matching set ✨)


and that's the whole page, fr fr. go forth and wind your vertices correctly, main character πŸ¦‹

SDL_ttf 3.2.2 β€” mwah, love u, bye πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from