vertex_format_add_colour

This function adds an RGBA colour attribute to the new vertex format being created.

IMPORTANT The attribute is stored as four bytes in the vertex buffer and turned into a vec4 (floats).

 

Syntax:

vertex_format_add_colour();

 

Returns:

N/A

 

Example:

vertex_format_begin();
vertex_format_add_colour();
vertex_format_add_position();
my_format = vertex_format_end();

The above code creates a new vertex format with just colour and position values and then stores the format in the variable my_format.