render method
void
render(
- SceneEncoder encoder,
- Matrix4 worldTransform,
- Texture? jointsTexture,
- int jointTextureWidth,
Draws the Geometry and Material data of each MeshPrimitive onto the screen.
This method prepares the Mesh for rendering by passing its data to a SceneEncoder. For skinned meshes, which are typically used in animations, the joint gpu.Texture data is also included to ensure proper rendering of animated features.
Implementation
void render(SceneEncoder encoder, Matrix4 worldTransform,
gpu.Texture? jointsTexture, int jointTextureWidth) {
for (var primitive in primitives) {
primitive.geometry.setJointsTexture(jointsTexture, jointTextureWidth);
encoder.encode(worldTransform, primitive.geometry, primitive.material);
}
}