al_destroy_shader(3alleg5)
π al_destroy_shader π
okay bestie, so this one lives in the Allegro reference manual (that's the manual name, iykyk) and it's literally just about saying bye to a shader π«Ά
β¨ NAME β¨
al_destroy_shader β the Allegro 5 API function that yeets a shader into the void πβ¨
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
void al_destroy_shader(ALLEGRO_SHADER *shader)
π¦ DESCRIPTION π¦
So like, this function destroys a shader. Periodt. π
Any bitmaps which currently use the shader will implicitly stop using the shader. The way that they just quietly move on... iconic. β¨
β οΈ okay so in multi-threaded programs, be careful that no such bitmaps are being accessed by other threads at the time. no cap, this is the important part, do not skip it π¨
As a convenience, if the target bitmap of the calling thread is using the shader, then the shader is implicitly unused before being destroyed. cute little built-in kindness, we love to see it π
Also! This function does nothing if the shader argument is NULL. lowkey the most chill function in the whole library, it just shrugs and moves on π
β SINCE β
5.1.0 β been here since the olden days bestie, she's a veteran π
π SEE ALSO π
al_create_shader(3alleg5)β the origin story, the main character that makes this whole thing possible π
and that's the vibe check, bestie! π§ this was pulled straight from the Allegro reference manual, page al_destroy_shader(3alleg5) β go forth and destroy responsibly, slay π
πΈβ¨
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms