ModelData:getMeshVertexFormat
EditReturns the vertex format of a mesh. The vertex format defines the properties associated with each vertex (position, color, etc.), including their types and binary data layout.
format = ModelData:getMeshVertexFormat(mesh)
Arguments
Name | Type | Description |
mesh | number | The index of a mesh. |
Returns
Name | Type | Description |
format | table | The vertex format of the mesh. |
Notes
The format is given as a table of vertex attributes. Each attribute is a table containing the following:
{ name, type, components, blob, offset, stride }
- The
name
will be aDefaultAttribute
. - The
type
will be anAttributeType
. - The
component
count will be 1-4. - The
blob
is an index of one of the Blobs in the model (seeModelData:getBlob
). - The
offset
is a byte offset from the start of the Blob where the attribute's data starts. - The
stride
is the number of bytes between consecutive values.