class
RendererMeshData
Contains mesh vertex and index data used for initializing, updating and reading mesh data from Mesh.
Public
Methods
GetPositions
Reads the vertex positions into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the position data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(Vector3)).
SetPositions
Writes the vertex positions from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the position data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(Vector3)).
GetNormals
Reads the vertex normals into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the normal data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(Vector3)).
SetNormals
Writes the vertex normals from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the normal data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(Vector3)).
GetTangents
Reads the vertex tangents into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the tangent data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(Vector4)).
SetTangents
Writes the vertex tangents from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the tangent data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(Vector4)).
GetColors
Reads the vertex colors into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the color data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(Color)).
SetColors
Writes the vertex colors from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the color data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(Color)).
SetColors
Writes the vertex colors from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the color data from. Colors should be in RGBA format.
- size
- Size of the input buffer. Must be (numVertices * sizeof(u32)).
GetUV0
Reads the first UV channel coordinates into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the coordinate data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(Vector2)).
SetUV0
Writes the first UV channel coordinates from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the coordinate data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(Vector2)).
GetUV1
Reads the second UV channel coordinates into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the coordinate data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(Vector2)).
SetUV1
Writes the second UV channel coordinates from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the coordinate data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(Vector2)).
GetBoneWeights
Reads the bone weights and indices into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the bone weight data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(BoneWeight)).
SetBoneWeights
Writes the bone weights and indices from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the bone weight data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(BoneWeight)).
GetIndices
Reads the indices into the provided output buffer.
Data will be copied and potentially uncompressed to fit the output format as needed.
- buffer
- Pre-allocated buffer to output the index data to.
- size
- Size of the pre-allocated buffer. Must be big enough to fit all contents (numVertices * sizeof(i32)).
SetIndices
Writes the indices from the provided output buffer.
Data will be copied and potentially compressed to fit the internal mesh data format as needed.
- buffer
- Pre-allocated buffer to read the index data from.
- size
- Size of the input buffer. Must be (numVertices * sizeof(i32)).
staticCreate
Creates a new empty mesh data structure.
staticCreate
Creates a new mesh data structure using an existing mesh data buffer.
staticVertexLayoutVertexDesc
Creates a vertex descriptor from a vertex layout enum.