Provided by: allegro5-doc_5.2.3.0-1_all bug

NAME

       ALLEGRO_PRIM_ATTR - Allegro 5 API

SYNOPSIS

              #include <allegro5/allegro_primitives.h>

              typedef enum ALLEGRO_PRIM_ATTR

DESCRIPTION

       Enumerates the types of vertex attributes that a custom vertex may have.

       · ALLEGRO_PRIM_POSITION    -    Position    information,    can    be   stored   only   in
         ALLEGRO_PRIM_SHORT_2, ALLEGRO_PRIM_FLOAT_2 and ALLEGRO_PRIM_FLOAT_3.

       · ALLEGRO_PRIM_COLOR_ATTR - Color information, stored in an  ALLEGRO_COLOR(3alleg5).   The
         storage field of ALLEGRO_VERTEX_ELEMENT is ignored

       · ALLEGRO_PRIM_TEX_COORD   -  Texture  coordinate  information,  can  be  stored  only  in
         ALLEGRO_PRIM_FLOAT_2 and ALLEGRO_PRIM_SHORT_2.  These coordinates are normalized by  the
         width  and  height  of  the  texture,  meaning  that the bottom-right corner has texture
         coordinates of (1, 1).

       · ALLEGRO_PRIM_TEX_COORD_PIXEL - Texture coordinate information, can  be  stored  only  in
         ALLEGRO_PRIM_FLOAT_2  and  ALLEGRO_PRIM_SHORT_2.   These  coordinates  are  measured  in
         pixels.

       · ALLEGRO_PRIM_USER_ATTR - A user specified attribute.  You can use any storage  for  this
         attribute.  You may have at most ALLEGRO_PRIM_MAX_USER_ATTR (currently 10) of these that
         you can specify by adding an index to the value  of  ALLEGRO_PRIM_USER_ATTR,  e.g.   the
         first     user     attribute    is    ALLEGRO_PRIM_USER_ATTR + 0,    the    second    is
         ALLEGRO_PRIM_USER_ATTR + 1 and so on.

         To access these custom attributes from GLSL shaders you need to declare attributes  that
         follow this nomenclature: user_attr_# where # is the index of the attribute.

         To  access  these  custom  attributes from HLSL you need to declare a parameter with the
         following semantics: TEXCOORD{# + 2} where # is the index of the attribute.   E.g.   the
         first attribute can be accessed via TEXCOORD2, second via TEXCOORD3 and so on.

         Since: 5.1.6

SEE ALSO

       ALLEGRO_VERTEX_DECL(3alleg5), ALLEGRO_PRIM_STORAGE(3alleg5)