natiny.mesh.set_dynamic
natiny.mesh.set_dynamic(mesh [, dynamic])
Selects the mesh upload path.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
mesh |
number |
Mesh handle | |
dynamic |
boolean |
true |
true to transform on the CPU every frame |
Example
natiny.mesh.set_dynamic(mesh, true)
Notes
- A static mesh - the default - is uploaded once into buffers of its own and drawn from there, one draw call per part.
- A dynamic mesh is transformed on the CPU into the shared batch every frame. Parts are batched per texture.
- The setting belongs to the mesh and therefore affects every model that shares it.