Vertex_data - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
Description
Adds all of the given vertex data to the given vertex buffer according to the vertex format specified when vertex_begin was called. The allows you to define vertex data more expressively with a single function call that has less overhead.
Parameters
Parameter | Data Type | Description |
---|---|---|
buffer | integer | Index of the vertex buffer. |
data... | varargs | Variadic list of vertex data including all attribute values. |
Return Values
void: This function does not return anything.
Example Call
// demonstrates adding four vertices defining a green rectangle to a vertex buffer in a single function call
vertex_begin(static_buffer, vf_position_color);
vertex_data(
static_buffer,
x, y, $FF00FF00,
x + 5, y, $FF00FF00,
x, y + 5, $FF00FF00,
x + 5, y + 5, $FF00FF00
);
vertex_end();
NOTOC