vertex_create_buffer_ext(size)

From ENIGMA

Jump to: navigation, search

Description

Creates a dynamically-allocated vertex buffer with an initial size big enough to hold the requested number of bytes and returns its index. The vertex buffer created by this function can be reused multiple times, the previous vertex data is cleared as soon as vertex_begin is called, unless the buffer has been frozen with vertex_freeze. It is generally more efficient to create a vertex buffer using this function, because when the buffer is created with its size ahead of time, less reallocations are needed internally as vertex data is added to the buffer.

Parameters

Parameter Data Type Description
size unsigned Initial size of the vertex buffer, in bytes.

Return Values

integer: Returns the index of the newly created vertex buffer.

Example Call

// demonstrates creating a vertex buffer 1mb in size
var buffer;
buffer = vertex_create_buffer_ext(1024 * 1024);
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox