1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
.TH "al_create_shader" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_create_shader \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>
ALLEGRO_SHADER\ *al_create_shader(ALLEGRO_SHADER_PLATFORM\ platform)
\f[]
.fi
.SH DESCRIPTION
.PP
Create a shader object.
.PP
The platform argument is one of the ALLEGRO_SHADER_PLATFORM(3) values,
and specifies the type of shader object to create, and which language is
used to program the shader.
.PP
The shader platform must be compatible with the type of display that you
will 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.
.PP
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.
.PP
Returns the shader object on success.
Otherwise, returns NULL.
.SH SINCE
.PP
5.1.0
.SH SEE ALSO
.PP
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)
|