1ALLEGRO_RENDER_STATE(3)                                ALLEGRO_RENDER_STATE(3)
2
3
4

NAME

6       ALLEGRO_RENDER_STATE - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              typedef enum ALLEGRO_RENDER_STATE {
12

DESCRIPTION

14       Possible render states which can be set with al_set_render_state(3):
15
16       ALLEGRO_ALPHA_TEST
17              If  this  is  set to 1, the values of ALLEGRO_ALPHA_FUNCTION and
18              ALLEGRO_ALPHA_TEST_VALUE define a comparison function  which  is
19              performed  on  the  alpha  component  of each pixel.  Only if it
20              evaluates to true the pixel is written.  Otherwise no subsequent
21              processing (like depth test or blending) is performed.  This can
22              be very useful, for example if a depth buffer is used but you do
23              not want fully transparent pixels to modify it.
24
25       ALLEGRO_ALPHA_FUNCTION
26              One  of  ALLEGRO_RENDER_FUNCTION(3),  only used when ALLEGRO_AL‐
27              PHA_TEST is 1.
28
29       ALLEGRO_ALPHA_TEST_VALUE
30              Only used when ALLEGRO_ALPHA_TEST is 1.  Should be a value of  0
31              - 255.
32
33       ALLEGRO_WRITE_MASK
34              This  determines how the framebuffer and depthbuffer are updated
35              whenever a pixel is written (in case alpha and/or depth  testing
36              is enabled: after all such enabled tests succeed).  Depth values
37              are only written if ALLEGRO_DEPTH_TEST is 1, in addition to  the
38              write mask flag being set.
39
40       ALLEGRO_DEPTH_TEST
41              If  this is set to 1, compare the depth value of any newly writ‐
42              ten pixels with the depth value already in the buffer, according
43              to  ALLEGRO_DEPTH_FUNCTION.  Allegro primitives with no explicit
44              z coordinate will write a value of 0 into the depth buffer.
45
46       ALLEGRO_DEPTH_FUNCTION
47              One  of  ALLEGRO_RENDER_FUNCTION(3),  only   used   when   ALLE‐
48              GRO_DEPTH_TEST is 1.
49

SINCE

51       5.1.2
52

SEE ALSO

54       al_set_render_state(3),        ALLEGRO_RENDER_FUNCTION(3),        ALLE‐
55       GRO_WRITE_MASK_FLAGS(3)
56
57
58
59Allegro reference manual                               ALLEGRO_RENDER_STATE(3)
Impressum