![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IVertexBuffer property interface.
This interface provides properties common to a class representing an array of individual vertices. Rendering of this buffer can either be done directly or in conjunction with an index buffer.
Murl.Graph.IAttributeContainer
Set the buffer access mode.
Boolean SetVertexBufferAccessMode(Murl.IEnums.BufferAccessMode mode)
mode | The access mode. |
Get the buffer access mode.
Murl.IEnums.BufferAccessMode GetVertexBufferAccessMode()
Set the maximum number of vertices the vertex buffer can hold.
Boolean SetMaxNumberOfVertices(Integer maxNumberOfVertices, Boolean preserveContents)
maxNumberOfVertices | The maximum capacity. |
preserveContents | If true, existing contents will be copied; but existing vertices beyond the new capacity are discarded. |
Get the maximum number of vertices the vertex buffer can hold.
Integer GetMaxNumberOfVertices()
Explicitly set the total byte size of single vertex element. This method explicitly sets the total byte size of a vertex element, i.e. the sum of all individual attributes' byte sizes. If not set, the vertex size is automatically calculated from all given attributes.
Boolean SetVertexByteSize(Integer byteSize)
byteSize | The total byte size (i.e. stride) of a vertex element. |
Get the total byte size of single vertex element in the buffer. This method returns the total size in bytes of a single vertex element, which represents the sum of all individual attribute item byte sizes.
Integer GetVertexByteSize()
Set the actual number of vertices currently used.
Boolean SetNumberOfVertices(Integer numberOfVertices)
numberOfVertices | The current number of vertices, in the range from 0 to GetMaxNumberOfVertices(). |
Mark the whole vertex buffer as modified.
Boolean SetVerticesModified()
Mark a portion of the vertex buffer as modified.
Boolean SetVerticesModified(Integer firstVertex, Integer numberOfVertices)
firstVertex | The zero-based index of the first modified vertex. |
numberOfVertices | The number of modified vertices. |