al_use_shader(3alleg5)
β¨ al_use_shader β¨
ok so bestie, this one's from the Allegro 5 API β aka the Allegro reference manual, and we're talking about al_use_shader π
buckle up.
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
bool al_use_shader(ALLEGRO_SHADER *shader)
π¦ DESCRIPTION π¦
okay so here's the tea β β al_use_shader makes your shader the main character for all the drawing you do next on the current target bitmap. every subsequent drawing operation? yeah, that shader is running the show now. slay β¨
and if you wanna stop using any shader on the current target bitmap, you just pass NULL. that's it, no shader, back to normal vibes π
it returns true on success π otherwise it returns false β like, for example, when the shader is incompatible with the target bitmap. that's the vibe check failing, bestie, no cap π
β SINCE β
5.1.6 β vintage but iconic π
π SEE ALSO π
al_destroy_shader(3alleg5)al_set_shader_sampler(3alleg5)al_set_shader_matrix(3alleg5)al_set_shader_int(3alleg5)al_set_shader_float(3alleg5)al_set_shader_bool(3alleg5)al_set_shader_int_vector(3alleg5)al_set_shader_float_vector(3alleg5)al_get_current_shader(3alleg5)
π«Ά the whole friend group's here, go read all of them, iykyk
and that's the page, bestie β this little love letter to al_use_shader lives in the Allegro reference manual π go off, and remember: pass NULL when you're done, don't leave your shaders hanging π§β¨
π¦ 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