Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.IVertexBuffer

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.


Table members

Inherited


Murl.Graph.IAttributeContainer

Methods


SetVertexBufferAccessMode(mode)

Set the buffer access mode.

Boolean SetVertexBufferAccessMode(Murl.IEnums.BufferAccessMode mode)

Parameters
modeThe access mode.
Returns
Boolean true if successful.

GetVertexBufferAccessMode()

Get the buffer access mode.

Murl.IEnums.BufferAccessMode GetVertexBufferAccessMode()

Returns
Murl.IEnums.BufferAccessMode The access mode.

SetMaxNumberOfVertices(maxNumberOfVertices, preserveContents)

Set the maximum number of vertices the vertex buffer can hold.

Boolean SetMaxNumberOfVertices(Integer maxNumberOfVertices, Boolean preserveContents)

Parameters
maxNumberOfVerticesThe maximum capacity.
preserveContentsIf true, existing contents will be copied; but existing vertices beyond the new capacity are discarded.
Returns
Boolean true if successful.

GetMaxNumberOfVertices()

Get the maximum number of vertices the vertex buffer can hold.

Integer GetMaxNumberOfVertices()

Returns
Integer The maximum capacity.

SetVertexByteSize(byteSize)

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)

Parameters
byteSizeThe total byte size (i.e. stride) of a vertex element.
Returns
Boolean true if successful.

GetVertexByteSize()

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()

Returns
Integer The total vertex element byte size.

SetNumberOfVertices(numberOfVertices)

Set the actual number of vertices currently used.

Boolean SetNumberOfVertices(Integer numberOfVertices)

Parameters
numberOfVerticesThe current number of vertices, in the range from 0 to GetMaxNumberOfVertices().
Returns
Boolean true if successful.

SetVerticesModified()

Mark the whole vertex buffer as modified.

Boolean SetVerticesModified()

Returns
Boolean true if successful.

SetVerticesModified(firstVertex, numberOfVertices)

Mark a portion of the vertex buffer as modified.

Boolean SetVerticesModified(Integer firstVertex, Integer numberOfVertices)

Parameters
firstVertexThe zero-based index of the first modified vertex.
numberOfVerticesThe number of modified vertices.
Returns
Boolean true if successful.