Home -> RawVertexAttribute -> Constructor

Description

The RawVertexAttribute constructor creates a vertex attribute description. The description records the data type, entry count, usage hints, and data persistence behaviour used when the attribute is later bound to a buffer and allocated.

The attribute description is immutable after construction. Create a new attribute object when the format, count, or storage behaviour needs to change.

Usage

RawVertexAttribute();
RawVertexAttribute(DataType dataType, size_t elementCount, size_t vertexCount, PerformanceHint performanceHintCpu, PerformanceHint performanceHintGpu, DataPersistenceFlags dataPersistenceFlags = DataPersistenceFlags::PersistAlways);

Argument list

dataType [DataType]
The data type of each scalar element in the attribute.
elementCount [size_t]
The number of scalar elements in each vertex attribute entry.
vertexCount [size_t]
The number of vertex entries described by the attribute.
performanceHintCpu [PerformanceHint]
The hint describing how the CPU is expected to read from or write to the attribute data.
performanceHintGpu [PerformanceHint]
The hint describing how the GPU is expected to read from or write to the attribute data.
dataPersistenceFlags [DataPersistenceFlags]
The persistence flags that describe when existing attribute data may be discarded.

See also