al_create_shader(3)
β¨ al_create_shader(3) β Allegro 5 API cutie from the Library Functions Manual β¨
okay so this is the al_create_shader(3) page, bestie, and it's giving we're making shader objects energy π
. The manual name is Library Functions Manual; the API is Allegro 5. Let's go π
π NAME π
al_create_shader β Allegro 5 API. Lowkey the function that creates a shader object, and that's the whole vibe check π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
ALLEGRO_SHADER *al_create_shader(ALLEGRO_SHADER_PLATFORM platform)
π¦ DESCRIPTION π¦
It creates a shader object. Main character behavior only β¨
The platform argument is one of the ALLEGRO_SHADER_PLATFORM(3) values, and it specifies the type of shader object to create, plus which language is used to program the shader. So it's not just decoration β it's telling the shader who it is π«Ά.
The shader platform must be compatible with the type of display you'll use the shader with. For example, you cannot create and use a HLSL shader on an OpenGL display, nor a GLSL shader on a Direct3D display. It's giving "wrong outfit for the wrong event" β the compatibility check is real π
The ALLEGRO_SHADER_AUTO value automatically chooses the appropriate platform for the display currently targeted by the calling thread; there must be such a display. It will create a GLSL shader for an OpenGL display, and a HLSL shader for a Direct3D display. Auto-pick, no cap π.
Returns the shader object on success. Otherwise, returns NULL. So if you get NULL, that's the universe saying "not today" π.
β SINCE β
5.1.0 β vintage but iconic π
π SEE ALSO π
al_attach_shader_source(3)al_attach_shader_source_file(3)al_build_shader(3)al_use_shader(3)al_destroy_shader(3)al_get_shader_platform(3)
And that's a wrap, bestie π β this came from the Allegro reference manual as the al_create_shader(3) page, with the since 5.1.0 energy. No date line on this footer, so we're not inventing one; just pure Allegro reference manual vibes β¨π
.
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms