al_destroy_shader(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 🌈


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