ALLEGRO_PRIM_STORAGE(3)

NAME

ALLEGRO_PRIM_STORAGE - Allegro 5 API

SYNOPSIS

    #include <allegro5/allegro_primitives.h>
    typedef enum ALLEGRO_PRIM_STORAGE

DESCRIPTION

Enumerates the types of storage an attribute of a custom vertex may be stored in. Many of these can only be used for ALLEGRO_PRIM_USER_ATTR attributes and can only be accessed via shaders. Usually no matter what the storage is specified the attribute gets converted to single precision floating point when the shader is run. Despite that, it may be advantageous to use more dense storage formats (e.g. ALLEGRO_PRIM_NORMALIZED_UBYTE_4 instead of ALLEGRO_PRIM_FLOAT_4) when bandwidth (amount of memory sent to the GPU) is an issue but precision is not.

•   ALLEGRO_PRIM_FLOAT_1 - A single float

    Since: 5.1.6

•   ALLEGRO_PRIM_FLOAT_2 - A doublet of floats

•   ALLEGRO_PRIM_FLOAT_3 - A triplet of floats

•   ALLEGRO_PRIM_FLOAT_4 - A quad of floats

    Since: 5.1.6

•   ALLEGRO_PRIM_SHORT_2 - A doublet of shorts

•   ALLEGRO_PRIM_SHORT_4 - A quad of shorts

    Since: 5.1.6

•   ALLEGRO_PRIM_UBYTE_4 - A quad of unsigned bytes

    Since: 5.1.6

•   ALLEGRO_PRIM_NORMALIZED_SHORT_2 - A doublet of shorts. Before being sent to the shader, each component is divided by 32767. Each component of the resultant float doublet ranges between -1.0 and 1.0

    Since: 5.1.6

•   ALLEGRO_PRIM_NORMALIZED_SHORT_4 - A quad of shorts. Before being sent to the shader, each component is divided by 32767. Each component of the resultant float quad ranges between -1.0 and 1.0

    Since: 5.1.6

•   ALLEGRO_PRIM_NORMALIZED_UBYTE_4 - A quad of unsigned bytes. Before being sent to the shader, each component is divided by 255. Each component of the resultant float quad ranges between 0.0 and 1.0

    Since: 5.1.6

•   ALLEGRO_PRIM_NORMALIZED_USHORT_2 - A doublet of unsigned shorts. Before being sent to the shader, each component is divided by 65535. Each component of the resultant float doublet ranges between 0.0 and 1.0

    Since: 5.1.6

•   ALLEGRO_PRIM_NORMALIZED_USHORT_4 - A quad of unsigned shorts. Before being sent to the shader, each component is divided by 65535. Each component of the resultant float quad ranges between 0.0 and 1.0

    Since: 5.1.6

•   ALLEGRO_PRIM_HALF_FLOAT_2 - A doublet of half-precision floats. Note that this storage format is not supported on all platforms. al_create_vertex_decl(3) will return NULL if you use it on those platforms

    Since: 5.1.6

•   ALLEGRO_PRIM_HALF_FLOAT_4 - A quad of half-precision floats. Note that this storage format is not supported on all platforms. al_create_vertex_decl(3) will return NULL if you use it on those platforms.

    Since: 5.1.6

SEE ALSO

ALLEGRO_PRIM_ATTR(3)