Home -> ReadOnlyVertexAttribute
Declaration
class ReadOnlyVertexAttribute :public IVertexAttribute;Description
The ReadOnlyVertexAttribute class represents a vertex attribute which has already been bound to a buffer and been populated with data, and only needs to be used from this point on but no longer needs to be modified. ReadOnlyVertexAttribute objects can only be initialized from an existing VertexAttribute or RawVertexAttribute object. The original attribute remains valid, and both are equivalent for use.
The intended purpose of the ReadOnlyVertexAttribute class is for ownership of an attribute to be transferred to another entity within the application, where there is no requirement to be able to modify or update the attribute, it simply needs to be bindable. This can be useful where attributes are aggregated into application-specific object types, and need to be able to be bound by the object type, but only the caller needs to be able to modify the data contained in the attributes.
Enumerations
| Name | Description | |
|---|---|---|
| DataType |
Indicates the fundamental type of the data contained in this attribute
|
|
| PerformanceHint |
Flags to provide hints to the graphics system about how the application will use this attribute. Correct use of
performance hints allows the renderer to optimize the way the data is stored and modified to give the best
performance.
|
|
| DataPersistenceFlags |
Flags to provide hints to the graphics system about the required lifetime of data stored in this attribute.
These flags can be used to reduce memory requirements or increase performance in some circumstances.
|
Members
Constructors
| Name | Description | |
|---|---|---|
| Constructor |
Creates a ReadOnlyVertexAttribute object. The object is populated by calling BuildReadOnlyAttribute on an existing attribute.
|
Type methods
| Name | Description | |
|---|---|---|
| GetDataType |
Returns the type of a single index entry
|
|
| GetVertexCount |
Returns the number of vertices accessible through this vertex attribute
|
|
| GetAttributeElementCount |
Returns the number of elements in the vector type set as the type of this vertex attribute
|
|
| GetDataTypeByteSize |
Returns the size of a single vertex entry in bytes
|
Usage methods
| Name | Description | |
|---|---|---|
| GetPerformanceHintCpu |
Returns the specified CPU performance hint for this vertex attribute
|
|
| GetPerformanceHintGpu |
Returns the specified GPU performance hint for this vertex attribute
|
|
| GetDataPersistenceFlags |
Returns the specified data persistence flags for this vertex attribute
|
Binding methods
| Name | Description | |
|---|---|---|
| IsBoundToBuffer |
Reports whether this attribute has already been bound to a buffer
|
|
| BuildReadOnlyAttribute |
Attempts to populate a ReadOnlyVertexAttribute
from this attribute. Note that this attribute must already have been bound to a buffer for the call to
succeed.
|