1al_create_shader(3) al_create_shader(3)
2
3
4
6 al_create_shader - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 ALLEGRO_SHADER *al_create_shader(ALLEGRO_SHADER_PLATFORM platform)
12
14 Create a shader object.
15
16 The platform argument is one of the ALLEGRO_SHADER_PLATFORM(3) values,
17 and specifies the type of shader object to create, and which language
18 is used to program the shader.
19
20 The shader platform must be compatible with the type of display that
21 you will use the shader with. For example, you cannot create and use a
22 HLSL shader on an OpenGL display, nor a GLSL shader on a Direct3D dis‐
23 play.
24
25 The ALLEGRO_SHADER_AUTO value automatically chooses the appropriate
26 platform for the display currently targeted by the calling thread;
27 there must be such a display. It will create a GLSL shader for an
28 OpenGL display, and a HLSL shader for a Direct3D display.
29
30 Returns the shader object on success. Otherwise, returns NULL.
31
33 5.1.0
34
36 al_attach_shader_source(3), al_attach_shader_source_file(3),
37 al_build_shader(3), al_use_shader(3), al_destroy_shader(3),
38 al_get_shader_platform(3)
39
40
41
42Allegro reference manual al_create_shader(3)