natiny.mesh.destroy

Lua
natiny.mesh.destroy(mesh)

Frees the geometry: the vertices of every part, and the textures that were loaded from the source file's materials.

Parameters

Name Type Description
mesh number Mesh handle

Example

Lua
natiny.mesh.destroy(mesh)

Notes

  • Do not use the mesh handle after destroy.
  • Textures returned by natiny.mesh.get_part_texture become invalid as well - they belong to the mesh.
  • Models still pointing at the mesh draw nothing.