Create a new vertex buffer.


GML Code Example


Returns: Pointer


With this function you can create a new vertex buffer. This is a special grow buffer created by GameMaker: Studio which is pre-formatted for use when building primitives (for use with shaders, for example). The function will return a "Pointer" (index) for the buffer which should then be used in all further calls to it.

When using a vertex buffer created with this function you simply call vertex_begin to start assigning vertex data to it to start to define your custom primitive, which will then be held in the buffer ready for submission to the shader. The buffer can be re-used when necessary (unless you have used the vertex_freeze function), with each call of vertex_begin wiping the previous buffer data ready to accept the new data.


GML Code Example

v_buff = vertex_create_buffer();

The above code will create a new a new vertex buffer and store its handle in the variable "v_buff".

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here