This function returns the vertex format that was started with vertex_format_begin.
vertex_format_end();
vertex_format_begin();
vertex_format_add_position();
vertex_format_add_colour();
my_format = vertex_format_end();
The above code creates a new vertex format with just position and colour values and then stores the format in the variable my_format.