Create a new vertex buffer.



返回: 指针


With this function you can create a new vertex buffer. This is a special grow buffer created by GameMaker Studio 2 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.


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".

上一页: Primitive Building
下一页: vertex_create_buffer_ext
© Copyright YoYo Games Ltd. 2018 All Rights Reserved