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

The IIndexBuffer property interface.

This interface provides properties common to a class representing an array of individual indices. Typically this is used in conjunction with a Graph::IVertexBuffer to represent an indexed mesh geometry, but there is no restriction to do so.


Table members

Methods


SetIndexBufferAccessMode(mode)

Set the buffer access mode.

Boolean SetIndexBufferAccessMode(Murl.IEnums.BufferAccessMode mode)

Parameters
modeThe access mode.
Returns
Boolean true if successful.

GetIndexBufferAccessMode()

Get the buffer access mode.

Murl.IEnums.BufferAccessMode GetIndexBufferAccessMode()

Returns
Murl.IEnums.BufferAccessMode The access mode.

SetMaxNumberOfIndices(maxNumberOfIndices, preserveContents)

Set the maximum number of indices the index buffer can hold.

Boolean SetMaxNumberOfIndices(Integer maxNumberOfIndices, Boolean preserveContents)

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

GetMaxNumberOfIndices()

Get the maximum number of indices the index buffer can hold.

Integer GetMaxNumberOfIndices()

Returns
Integer The maximum capacity.

SetIndexType(type)

Set the data type of the indices stored in the buffer.

Boolean SetIndexType(Murl.IEnums.IndexType type)

Parameters
typeOne of the IEnums::IndexType members.
Returns
Boolean true if successful.

GetIndexType()

Get the data type of the indices stored in the buffer.

Murl.IEnums.IndexType GetIndexType()

Returns
Murl.IEnums.IndexType One of the IEnums::IndexType members.

GetIndexByteSize()

Get the number of bytes of a single index element stored.

Integer GetIndexByteSize()

Returns
Integer The number of bytes per index element.

SetNumberOfIndices(numberOfIndices)

Set the actual number of indices currently used.

Boolean SetNumberOfIndices(Integer numberOfIndices)

Parameters
numberOfIndicesThe current number of indices, in the range from 0 to GetMaxNumberOfIndices().
Returns
Boolean true if successful.

SetIndicesModified()

Mark the whole index buffer as modified.

Boolean SetIndicesModified()

Returns
Boolean true if successful.

SetIndicesModified(firstIndex, numberOfIndices)

Mark a portion of the index buffer as modified.

Boolean SetIndicesModified(Integer firstIndex, Integer numberOfIndices)

Parameters
firstIndexThe zero-based index of the first modified index value.
numberOfIndicesThe number of modified indices.
Returns
Boolean true if successful.