ALLEGRO_VERTEX
typedef struct ALLEGRO_VERTEX ALLEGRO_VERTEX;
Introduced in 5.0.0
Defines the generic vertex type, with a 3D position, color and texture coordinates for a single texture. Note that at this time, the software driver for this addon cannot render 3D primitives. If you want a 2D only primitive, set z to 0. Note that when you must initialize all members of this struct when you're using it. One exception to this rule are the u and v variables which can be left uninitialized when you are not using textures.
Fields:
- x, y, z - Position of the vertex
- color - ALLEGRO_COLOR structure, storing the color of the vertex
- u, v - Texture coordinates measured in pixels
See also: ALLEGRO_PRIM_ATTR
Examples: ex_gp2xwiz, ex_prim
Most helpful discussions:
- struct inititalization in C and in C++ (1)
- fastest way to plot pixels A5 (1)
- Allegro primitives 5.0 - memory leak? (1)
- tranformations with A5
- Mipmap causing texture bleeding
- Drawing in Allegro5 (Part 2)
- Rendering modes for bitmaps?
- Fastest way to draw many (many!) primitives
- First person camera using transformations
- 3D rotation using Allegro 5.2.4
Other recent discussions:
- Implementing a simple skybox.
- Vertex Buffers - Allegro Primitives mach_msg_trap
- Building a skybox using orthographic transfom
- Further question regarding camera and projection transforms
- Setting up projection and camera matrices correctly for bitmaps in 3D
- Locking bitmap is slower than not (?)
- [A5] Drawing a textured trapezoid (2D)
- Shader output is blocky
- Tonight, there will be shadows
- 3D Model Hack!! :D