-
Notifications
You must be signed in to change notification settings - Fork 0
Vertex_data
hpgDesigns edited this page Aug 8, 2021
·
1 revision
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.
| Parameter | Data Type | Description |
|---|---|---|
| buffer | integer | Index of the vertex buffer. |
| data... | varargs | Variadic list of vertex data including all attribute values. |
void: This function does not return anything.
// 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
This is number 1