SDL_DestroyTexture(3)

πŸ’…βœ¨ SDL_DestroyTexture(3) βœ¨πŸ’…

okay so this page lives in the SDL3 FUNCTIONS manual, and it's literally about destroying a texture. the function name ate and left no crumbs. πŸ’–


πŸŽ€ NAME πŸŽ€

SDL_DestroyTexture β€” destroy the specified texture. periodt, that's the whole job. πŸ’…

🌸 SYNOPSIS 🌸

#include <SDL3/SDL_render.h>

void SDL_DestroyTexture(SDL_Texture *texture);

πŸ¦‹ DESCRIPTION πŸ¦‹

Passing NULL or an otherwise invalid texture will set the SDL error message to "Invalid texture". so if you pass it something invalid, SDL is highkey gonna say exactly that. no cap. 😭

πŸ’– FUNCTION PARAMETERS πŸ’–

  • texture β€” the texture to destroy. hand over the texture, bestie, and let it go. 🫢

πŸ‘‘ THREAD SAFETY πŸ‘‘

⚠️ main thread only, fr fr. This function should only be called on the main thread. do not bring worker-thread chaos into this, iykyk. πŸ‘‘

⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. if you're on older SDL, it's giving "not yet, bestie" πŸ’€

🌈 SEE ALSO 🌈


mwah πŸ’‹ this page is from Simple Directmedia Layer, version SDL 3.4.18, and the page itself is SDL_DestroyTexture(3). the footer didn't show a date, so I'm not making one up β€” just source, version, and love. πŸŽ€βœ¨

πŸ“¦ where this page comes from