natiny_model_create

C
NatinyModel natiny_model_create(void);

Creates an empty model. A model handle is also a NatinyEntity, so natiny_entity_* functions can transform and parent it.

Returns

Type Description
NatinyModel Model handle, also usable as a NatinyEntity; 0 on failure

Example

C
NatinyModel box  = natiny_model_create();

Notes

  • A model starts at the world origin, white, visible and empty. An empty model draws nothing, so filling one in over several statements is safe.
  • Any number of models may share one mesh: geometry is an asset and is stored once however many places it appears.
  • Without a material, a model uses the built-in material and its "model" tag.
  • Returns 0 when there is no room for another model.