Home -> VertexAttribute -> Constructor
Description
The VertexAttribute 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
VertexAttribute();
VertexAttribute(size_t vertexCount, PerformanceHint performanceHintCpu, PerformanceHint performanceHintGpu, DataPersistenceFlags dataPersistenceFlags = DataPersistenceFlags::PersistAlways);
Argument list
- 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.