al_get_default_shader_source(3alleg5)
β¨ al_get_default_shader_source β¨
okay bestie, welcome to the Allegro 5 API manual, the al_get_default_shader_source(3alleg5) page π this one's short and sweet, so let's get into it.
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
char const *al_get_default_shader_source(ALLEGRO_SHADER_PLATFORM platform,
ALLEGRO_SHADER_TYPE type)
π¦ DESCRIPTION π¦
So this function hands you back a string containing the source code for Allegro's default vertex or pixel shader β whichever one is the right fit for the platform you passed in. Slay. π
Now for the tea on ALLEGRO_SHADER_AUTO: if you pass that, it means GLSL gets used when OpenGL is the one doing the rendering, and otherwise it's HLSL. π
β οΈ lowkey important: ALLEGRO_SHADER_AUTO requires that there's a current display set on the calling thread. no display, no deal, fr fr.
Also, heads up β this function can return NULL if Allegro was built without support for shaders on the platform you picked. so like, check your return value, bestie, don't just assume. π
β SINCE β
5.1.6
π SEE ALSO π
and that's the whole page, no cap π shoutout to the Allegro reference manual for keeping it iconic β al_get_default_shader_source(3alleg5), mwah, bye bestie π«Άβ¨
π¦ 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