1ALLEGRO_PRIM_STORAGE(3)                                ALLEGRO_PRIM_STORAGE(3)
2
3
4

NAME

6       ALLEGRO_PRIM_STORAGE - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro_primitives.h>
10
11              typedef enum ALLEGRO_PRIM_STORAGE
12

DESCRIPTION

14       Enumerates  the types of storage an attribute of a custom vertex may be
15       stored in.  Many of these can only be used  for  ALLEGRO_PRIM_USER_ATTR
16       attributes  and  can  only  be accessed via shaders.  Usually no matter
17       what the storage is specified the attribute gets  converted  to  single
18       precision  floating point when the shader is run.  Despite that, it may
19       be  advantageous  to  use  more  dense  storage  formats  (e.g.   ALLE‐
20       GRO_PRIM_NORMALIZED_UBYTE_4 instead of ALLEGRO_PRIM_FLOAT_4) when band‐
21       width (amount of memory sent to the GPU) is an issue but  precision  is
22       not.
23
24       · ALLEGRO_PRIM_FLOAT_1 - A single float
25         Since: 5.1.6
26
27       · ALLEGRO_PRIM_FLOAT_2 - A doublet of floats
28
29       · ALLEGRO_PRIM_FLOAT_3 - A triplet of floats
30
31       · ALLEGRO_PRIM_FLOAT_4 - A quad of floats
32         Since: 5.1.6
33
34       · ALLEGRO_PRIM_SHORT_2 - A doublet of shorts
35
36       · ALLEGRO_PRIM_SHORT_4 - A quad of shorts
37         Since: 5.1.6
38
39       · ALLEGRO_PRIM_UBYTE_4 - A quad of unsigned bytes
40         Since: 5.1.6
41
42       · ALLEGRO_PRIM_NORMALIZED_SHORT_2  - A doublet of shorts.  Before being
43         sent to the shader, each component is divided by 32767.  Each  compo‐
44         nent of the resultant float doublet ranges between -1.0 and 1.0
45         Since: 5.1.6
46
47       · ALLEGRO_PRIM_NORMALIZED_SHORT_4  -  A  quad  of shorts.  Before being
48         sent to the shader, each component is divided by 32767.  Each  compo‐
49         nent of the resultant float quad ranges between -1.0 and 1.0
50         Since: 5.1.6
51
52       · ALLEGRO_PRIM_NORMALIZED_UBYTE_4  -  A quad of unsigned bytes.  Before
53         being sent to the shader, each component is  divided  by  255.   Each
54         component of the resultant float quad ranges between 0.0 and 1.0
55         Since: 5.1.6
56
57       · ALLEGRO_PRIM_NORMALIZED_USHORT_2  -  A  doublet  of  unsigned shorts.
58         Before being sent to the shader, each component is divided by  65535.
59         Each  component of the resultant float doublet ranges between 0.0 and
60         1.0
61         Since: 5.1.6
62
63       · ALLEGRO_PRIM_NORMALIZED_USHORT_4 - A quad of unsigned shorts.  Before
64         being  sent  to the shader, each component is divided by 65535.  Each
65         component of the resultant float quad ranges between 0.0 and 1.0
66         Since: 5.1.6
67
68       · ALLEGRO_PRIM_HALF_FLOAT_2 - A doublet of half-precision floats.  Note
69         that  this storage format is not supported on all platforms.  al_cre‐
70         ate_vertex_decl(3) will return NULL if you use it on those platforms
71         Since: 5.1.6
72
73       · ALLEGRO_PRIM_HALF_FLOAT_4 - A quad of  half-precision  floats.   Note
74         that  this storage format is not supported on all platforms.  al_cre‐
75         ate_vertex_decl(3) will return NULL if you use it on those platforms.
76
77         Since: 5.1.6
78

SEE ALSO

80       ALLEGRO_PRIM_ATTR(3)
81
82
83
84Allegro reference manual                               ALLEGRO_PRIM_STORAGE(3)
Impressum