attribute
fun attribute(attribute: VertexBuffer.VertexAttribute, bufferIndex: Int, attributeType: VertexBuffer.AttributeType, byteOffset: Int = 0, byteStride: Int = 0): VertexBuffer.Builder
Sets up an attribute for this vertex buffer set.
Using byteOffset and byteStride, attributes can be interleaved in the same buffer. TANGENTS must be specified as a quaternion and is how normals are specified.
Not all backends support 3-component attributes that are not floats.
Return
This Builder, for chaining calls
Parameters
attribute
The attribute to set up
bufferIndex
The index of the buffer containing the data (0 to bufferCount - 1)
attributeType
The type of the attribute data
byteOffset
Offset in bytes into the buffer (default: 0)
byteStride
Stride in bytes to the next element. When 0, uses the attribute size