Marks the given vertex buffer as "frozen" causing it to be treated as read-only, after which you will not be able to specify new vertex data. This function can be called at any time on a vertex buffer, but it is most efficient to call it after vertex_end because vertex buffers do not actually upload their vertex data to the GPU until the first vertex_submit if their contents are "dirty" from a vertex_begin call. Subsequent calls to this function are ignored. This function will effectively make a vertex buffer render faster because its contents will also be marked as static instead of dynamic for the driver.
|buffer||integer||Index of the vertex buffer.|
void: This function does not return anything.
vertex_color(static_buffer, c_red, 1);
vertex_position(static_buffer, 100, room_height - 100);
vertex_color(static_buffer, c_green, 1);
vertex_position(static_buffer, room_width / 2, 100);
vertex_color(static_buffer, c_blue, 1);
vertex_position(static_buffer, room_width - 100, 100);
// demonstrates freezing a vertex buffer just after specifying its vertex data