VertexAttributeDescriptor
class VertexAttributeDescriptor
Descriptor for a single vertex attribute.
Defines how a specific vertex attribute is structured within a vertex buffer. If the offset is set to AUTO_OFFSET, the attribute will be placed immediately after the previous attribute in the same buffer, or at the beginning of the vertex data if this is the first attribute. The offset cannot exceed MAX_OFFSET.
| Throws | |
|---|---|
IllegalArgumentException |
if the given |
Summary
Constants |
|
|---|---|
const Int |
Indicates that the attribute offset should be computed automatically by placing it immediately after the previous attribute in the same buffer, or at the beginning of the vertex data if this is the first attribute. |
const Int |
MAX_OFFSET = 32767The maximum allowed byte offset for a vertex attribute. |
Public constructors |
|---|
VertexAttributeDescriptor( |
Public properties |
|
|---|---|
VertexAttribute |
The |
@IntRange(from = -1, to = 32767) Int |
The byte offset of the attribute from the start of the vertex data. |
VertexAttributeType |
The |
Constants
AUTO_OFFSET
const val AUTO_OFFSET: Int
Indicates that the attribute offset should be computed automatically by placing it immediately after the previous attribute in the same buffer, or at the beginning of the vertex data if this is the first attribute.
MAX_OFFSET
const val MAX_OFFSET = 32767: Int
The maximum allowed byte offset for a vertex attribute.
Public constructors
VertexAttributeDescriptor
VertexAttributeDescriptor(
attribute: VertexAttribute,
type: VertexAttributeType,
offset: @IntRange(from = -1, to = 32767) Int = AUTO_OFFSET
)
| Parameters | |
|---|---|
attribute: VertexAttribute |
The |
type: VertexAttributeType |
The |
offset: @IntRange(from = -1, to = 32767) Int = AUTO_OFFSET |
The byte offset of the attribute from the start of the vertex data. |
Public functions
Public properties
attribute
val attribute: VertexAttribute
The VertexAttribute semantic of the attribute.
offset
val offset: @IntRange(from = -1, to = 32767) Int
The byte offset of the attribute from the start of the vertex data.
type
val type: VertexAttributeType
The VertexAttributeType data type of the attribute.