addMesh method

void addMesh(
  1. GpuPrimitive primitive,
  2. GpuMaterial material, {
  3. Matrix4? local,
  4. bool castShadows = true,
})

Draws primitive in material at local (entity from mesh; the entity's origin when null).

Implementation

void addMesh(
  GpuPrimitive primitive,
  GpuMaterial material, {
  Matrix4? local,
  bool castShadows = true,
}) => _meshes.add((primitive, material, local ?? Matrix4.identity(), castShadows));