The IVertexBuffer property interface. More...
#include "murl_graph_i_vertex_buffer.h"
Public Member Functions | |
virtual Bool | SetVertexBufferAccessMode (IEnums::BufferAccessMode mode)=0 |
Set the buffer access mode. More... | |
virtual IEnums::BufferAccessMode | GetVertexBufferAccessMode () const =0 |
Get the buffer access mode. More... | |
virtual Bool | SetMaxNumberOfVertices (UInt32 maxNumberOfVertices, Bool preserveContents)=0 |
Set the maximum number of vertices the vertex buffer can hold. More... | |
virtual UInt32 | GetMaxNumberOfVertices () const =0 |
Get the maximum number of vertices the vertex buffer can hold. More... | |
virtual Bool | SetVertexByteSize (UInt32 byteSize)=0 |
Explicitly set the total byte size of single vertex element. More... | |
virtual UInt32 | GetVertexByteSize () const =0 |
Get the total byte size of single vertex element in the buffer. More... | |
virtual void * | GetVertexData ()=0 |
Retrieve a mutable pointer to the vertex data stored in the buffer. More... | |
virtual const void * | GetVertexData () const =0 |
Retrieve a constant pointer to the vertex data stored in the buffer. More... | |
virtual Bool | SetNumberOfVertices (UInt32 numberOfVertices)=0 |
Set the actual number of vertices currently used. More... | |
virtual Bool | SetVerticesModified ()=0 |
Mark the whole vertex buffer as modified. More... | |
virtual Bool | SetVerticesModified (UInt32 firstVertex, UInt32 numberOfVertices)=0 |
Mark a portion of the vertex buffer as modified. More... | |
virtual Video::IVertexBuffer * | GetVideoObject ()=0 |
Returns the underlying video vertex buffer object. More... | |
Public Member Functions inherited from Murl::Graph::IAttributeContainer | |
virtual SInt32 | AddAttribute (IEnums::AttributeItem item, IEnums::AttributeType type, UInt32 &byteOffset)=0 |
Add a predefined vertex attribute. More... | |
virtual SInt32 | AddAttribute (const String &name, IEnums::AttributeType type, UInt32 &byteOffset)=0 |
Add a user-defined vertex attribute. More... | |
virtual SInt32 | GetAttributeIndex (IEnums::AttributeItem item) const =0 |
Query the location of a predefined attribute in the container. More... | |
virtual SInt32 | GetAttributeIndex (const String &name) const =0 |
Query the location of a user-defined attribute in the container. More... | |
virtual UInt32 | GetNumberOfAttributes () const =0 |
Get the total number of individual attributes in the container. More... | |
virtual IEnums::AttributeType | GetAttributeType (UInt32 index) const =0 |
Query the type of an attribute at a given index. More... | |
virtual IEnums::AttributeItem | GetAttributeItem (UInt32 index) const =0 |
Query the predefined item of an attribute at a given index. More... | |
virtual const String & | GetAttributeName (UInt32 index) const =0 |
Query the variable name of an attribute at a given index. More... | |
virtual UInt32 | GetAttributeByteOffset (UInt32 index) const =0 |
Get the byte offset of an attribute at a given index. More... | |
virtual IAttribute * | GetAttribute (UInt32 index) const =0 |
Get the attribute object at a given index. More... | |
virtual IFloatAttribute * | GetFloatAttribute (UInt32 index) const =0 |
Get the attribute at a given index as a scalar float object. More... | |
virtual IFloatVector2Attribute * | GetFloatVector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 2-component float vector object. More... | |
virtual IFloatVector3Attribute * | GetFloatVector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 3-component float vector object. More... | |
virtual IFloatVector4Attribute * | GetFloatVector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 4-component float vector object. More... | |
virtual IUInt8Attribute * | GetUInt8Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a scalar UInt8 object. More... | |
virtual IUInt8Vector2Attribute * | GetUInt8Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 2-component UInt8 vector object. More... | |
virtual IUInt8Vector3Attribute * | GetUInt8Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 3-component UInt8 vector object. More... | |
virtual IUInt8Vector4Attribute * | GetUInt8Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 4-component UInt8 vector object. More... | |
virtual ISInt8Attribute * | GetSInt8Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a scalar SInt8 object. More... | |
virtual ISInt8Vector2Attribute * | GetSInt8Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 2-component SInt8 vector object. More... | |
virtual ISInt8Vector3Attribute * | GetSInt8Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 3-component SInt8 vector object. More... | |
virtual ISInt8Vector4Attribute * | GetSInt8Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 4-component SInt8 vector object. More... | |
virtual IUInt16Attribute * | GetUInt16Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a scalar UInt16 object. More... | |
virtual IUInt16Vector2Attribute * | GetUInt16Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 2-component UInt16 vector object. More... | |
virtual IUInt16Vector3Attribute * | GetUInt16Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 3-component UInt16 vector object. More... | |
virtual IUInt16Vector4Attribute * | GetUInt16Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 4-component UInt16 vector object. More... | |
virtual ISInt16Attribute * | GetSInt16Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a scalar SInt16 object. More... | |
virtual ISInt16Vector2Attribute * | GetSInt16Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 2-component SInt16 vector object. More... | |
virtual ISInt16Vector3Attribute * | GetSInt16Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 3-component SInt16 vector object. More... | |
virtual ISInt16Vector4Attribute * | GetSInt16Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 4-component SInt16 vector object. More... | |
virtual IUInt32Attribute * | GetUInt32Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a scalar UInt32 object. More... | |
virtual IUInt32Vector2Attribute * | GetUInt32Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 2-component UInt32 vector object. More... | |
virtual IUInt32Vector3Attribute * | GetUInt32Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 3-component UInt32 vector object. More... | |
virtual IUInt32Vector4Attribute * | GetUInt32Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 4-component UInt32 vector object. More... | |
virtual ISInt32Attribute * | GetSInt32Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a scalar SInt32 object. More... | |
virtual ISInt32Vector2Attribute * | GetSInt32Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 2-component SInt32 vector object. More... | |
virtual ISInt32Vector3Attribute * | GetSInt32Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 3-component SInt32 vector object. More... | |
virtual ISInt32Vector4Attribute * | GetSInt32Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a 4-component SInt32 vector object. More... | |
virtual IUInt8Attribute * | GetNormalizedUInt8Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized scalar UInt8 object. More... | |
virtual IUInt8Vector2Attribute * | GetNormalizedUInt8Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 2-component UInt8 vector object. More... | |
virtual IUInt8Vector3Attribute * | GetNormalizedUInt8Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 3-component UInt8 vector object. More... | |
virtual IUInt8Vector4Attribute * | GetNormalizedUInt8Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 4-component UInt8 vector object. More... | |
virtual ISInt8Attribute * | GetNormalizedSInt8Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized scalar SInt8 object. More... | |
virtual ISInt8Vector2Attribute * | GetNormalizedSInt8Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 2-component SInt8 vector object. More... | |
virtual ISInt8Vector3Attribute * | GetNormalizedSInt8Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 3-component SInt8 vector object. More... | |
virtual ISInt8Vector4Attribute * | GetNormalizedSInt8Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 4-component SInt8 vector object. More... | |
virtual IUInt16Attribute * | GetNormalizedUInt16Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized scalar UInt16 object. More... | |
virtual IUInt16Vector2Attribute * | GetNormalizedUInt16Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 2-component UInt16 vector object. More... | |
virtual IUInt16Vector3Attribute * | GetNormalizedUInt16Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 3-component UInt16 vector object. More... | |
virtual IUInt16Vector4Attribute * | GetNormalizedUInt16Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 4-component UInt16 vector object. More... | |
virtual ISInt16Attribute * | GetNormalizedSInt16Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized scalar SInt16 object. More... | |
virtual ISInt16Vector2Attribute * | GetNormalizedSInt16Vector2Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 2-component SInt16 vector object. More... | |
virtual ISInt16Vector3Attribute * | GetNormalizedSInt16Vector3Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 3-component SInt16 vector object. More... | |
virtual ISInt16Vector4Attribute * | GetNormalizedSInt16Vector4Attribute (UInt32 index) const =0 |
Get the attribute at a given index as a normalized 4-component SInt16 vector object. More... | |
Detailed Description
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.
Member Function Documentation
◆ SetVertexBufferAccessMode()
|
pure virtual |
Set the buffer access mode.
- Parameters
-
mode The access mode.
- Returns
- true if successful.
◆ GetVertexBufferAccessMode()
|
pure virtual |
Get the buffer access mode.
- Returns
- The access mode.
◆ SetMaxNumberOfVertices()
|
pure virtual |
Set the maximum number of vertices the vertex buffer can hold.
- Parameters
-
maxNumberOfVertices The maximum capacity. preserveContents If true, existing contents will be copied; but existing vertices beyond the new capacity are discarded.
- Returns
- true if successful.
◆ GetMaxNumberOfVertices()
|
pure virtual |
Get the maximum number of vertices the vertex buffer can hold.
- Returns
- The maximum capacity.
◆ SetVertexByteSize()
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.
- Parameters
-
byteSize The total byte size (i.e. stride) of a vertex element.
- Returns
- true if successful.
◆ GetVertexByteSize()
|
pure virtual |
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.
- Returns
- The total vertex element byte size.
◆ GetVertexData() [1/2]
|
pure virtual |
Retrieve a mutable pointer to the vertex data stored in the buffer.
- Returns
- A mutable pointer to the data.
◆ GetVertexData() [2/2]
|
pure virtual |
Retrieve a constant pointer to the vertex data stored in the buffer.
- Returns
- A constant pointer to the data.
◆ SetNumberOfVertices()
|
pure virtual |
Set the actual number of vertices currently used.
- Parameters
-
numberOfVertices The current number of vertices, in the range from 0 to GetMaxNumberOfVertices().
- Returns
- true if successful.
◆ SetVerticesModified() [1/2]
|
pure virtual |
Mark the whole vertex buffer as modified.
- Returns
- true if successful.
◆ SetVerticesModified() [2/2]
|
pure virtual |
Mark a portion of the vertex buffer as modified.
- Parameters
-
firstVertex The zero-based index of the first modified vertex. numberOfVertices The number of modified vertices.
- Returns
- true if successful.
◆ GetVideoObject()
|
pure virtual |
Returns the underlying video vertex buffer object.
- Returns
- pointer to Video::IVertexBuffer object.
The documentation for this interface was generated from the following file:
- murl_graph_i_vertex_buffer.h