SDL_CreateGPURenderState(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– SDL_CreateGPURenderState(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_CreateGPURenderState β€” she makes custom GPU render state. no cap.


✨ NAME ✨

SDL_CreateGPURenderState β€” Create custom GPU render state. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_render.h>

SDL_GPURenderState * SDL_CreateGPURenderState(SDL_Renderer *renderer, const SDL_GPURenderStateCreateInfo *createinfo);

like, that's the whole vibe. two args, one pointer back. slay.


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • renderer β€” the renderer you wanna use. that's the one. your renderer. 🫢
  • createinfo β€” a struct describing the GPU render state you're trying to create. it's giving "here's the blueprint, go off". ✨

⭐ RETURN VALUE ⭐

She returns a custom GPU render state when things go right β€” and NULL on failure 😭. If you get NULL, don't panic, just call SDL_GetError() for more info, because she will tell you what went wrong. iykyk.


🧚 THREAD SAFETY 🧚

real talk: call this one on the thread that created the renderer. literally the same thread. don't be out here threading it from somewhere else, that's not the move. πŸ™ˆ

🌈 AVAILABILITY 🌈

This function is available since SDL 3.4.0. so if you're on anything older, she's simply not there yet. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, bestie, they're the whole friend group. πŸ¦‹


Simple Directmedia Layer ✿ SDL 3.4.18 ✿ SDL_CreateGPURenderState(3)

and that's the page, bestie πŸ’– brought to you by Simple Directmedia Layer, SDL 3.4.18 β€” stay hydrated, free your render state when you're done, and remember: NULL means check the error. periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from