vertex_begin


Description

With this function you begin the definition of a custom primitive. You assign a buffer to write the primitive to, and the vertex format to use (previously defined using the vertex format functions). You would then define the necessary points for each vertex of the primitive before calling vertex_end to finalise the primitive creation.


Syntax:

vertex_begin(buffer, format);

Argument Description
buffer The buffer to be written to.
format The vertex format to use.


Returns:

N/A


Example:

vertex_format_begin();
vertex_format_add_position();
vertex_format_add_colour();
vertex_format_add_textcoord();
v_format = vertex_format_end();
v_buff = vertex_create_buffer();
vertex_begin(v_buff, v_format);

The above code will define a new vertex format, create a new buffer and start the definition process of a new primitive.