docs/android/dokka/filament-android/com.google.android.filament/-vertex-buffer/-builder/attribute.md
//filament-android/com.google.android.filament/VertexBuffer/Builder/attribute
[main]
open fun attribute(attribute: VertexBuffer.VertexAttribute, bufferIndex: Int, attributeType: VertexBuffer.AttributeType, byteOffset: Int, byteStride: Int): VertexBuffer.Builder
Sets up an attribute for this vertex buffer set. Using byteOffset and byteStride, attributes can be interleaved in the same buffer.
This is a no-op if the attribute is an invalid enum. This is a no-op if the bufferIndex is out of bounds.
Warning: VertexAttribute.TANGENTS must be specified as a quaternion and is how normals are specified.
A reference to this Builder for chaining calls.
main
| attribute | the attribute to set up |
| bufferIndex | the index of the buffer containing the data for this attribute. Must be between 0 and bufferCount() - 1. |
| attributeType | the type of the attribute data (e.g. byte, float3, etc...) |
| byteOffset | offset in bytes into the buffer bufferIndex |
| byteStride | stride in bytes to the next element of this attribute. When set to zero the attribute size, as defined by attributeType is used. |
| VertexBuffer.VertexAttribute |
[main]
open fun attribute(attribute: VertexBuffer.VertexAttribute, bufferIndex: Int, attributeType: VertexBuffer.AttributeType): VertexBuffer.Builder
Sets up an attribute for this vertex buffer set. Using byteOffset and byteStride, attributes can be interleaved in the same buffer.
This is a no-op if the attribute is an invalid enum. This is a no-op if the bufferIndex is out of bounds.
Warning: VertexAttribute.TANGENTS must be specified as a quaternion and is how normals are specified.
A reference to this Builder for chaining calls.
main
| attribute | the attribute to set up |
| bufferIndex | the index of the buffer containing the data for this attribute. Must be between 0 and bufferCount() - 1. |
| attributeType | the type of the attribute data (e.g. byte, float3, etc...) |
| VertexBuffer.VertexAttribute |