Record ALLEGRO_VERTEX_ELEMENT
Hierarchy Methods Properties
Unit
al5primitives
Declaration
type ALLEGRO_VERTEX_ELEMENT = record
Description
A small structure describing a certain element of a vertex. E.g. the position of the vertex, or its color. These structures are used by the al_create_vertex_decl function to create the vertex declaration. For that they generally occur in an array. The last element of such an array should have the attribute field equal to 0, to signify that it is the end of the array. Here is an example code that would create a declaration describing the ALLEGRO_VERTEX structure (passing this as vertex declaration to al_draw_prim would be identical to passing Nil):
CONST
Elements: ARRAY [0..1] OF ALLEGRO_VERTEX_ELEMENT = (
(attribute: ALLEGRO_PRIM_POSITION, storage: ALLEGRO_PRIM_FLOAT_3, offset: 0),
(attribute: ALLEGRO_PRIM_TEX_COORD_PIXEL, storage: ALLEGRO_PRIM_FLOAT_2, offset: SIZEOF (AL_FLOAT) * 3),
(attribute: ALLEGRO_PRIM_COLOR_ATTR, storage: ALLEGRO_PRIM_STORAGE_NONE, offset: SIZEOF (AL_FLOAT) * 5),
(attribute: ALLEGRO_PRIM_ATTR_NONE, storage: ALLEGRO_PRIM_STORAGE_NONE, offset: 0)
);
Declaration: ALLEGRO_VERTEX_DECLptr;
BEGIN
Declaration := al_create_vertex_decl (Elements, SIZEOF (ALLEGRO_VERTEX));
See also
- al_create_vertex_decl
- Creates a vertex declaration, which describes a custom vertex format.
- ALLEGRO_VERTEX_DECLptr
- A vertex declaration.
- ALLEGRO_PRIM_ATTR
- Enumerates the types of vertex attributes that a custom vertex may have.
- ALLEGRO_PRIM_STORAGE
- Enumerates the types of storage an attribute of a custom vertex may be stored in.
Overview
Fields
Description
Fields
offset: AL_INT; |
|
Offset in bytes from the beginning of the custom vertex structure. The C function offsetof is very useful here.
|
Generated by PasDoc 0.15.0. Generated on 2024-11-10 15:15:06.
|