Garry's Mod Wiki


Renderable mesh object, can be used to create models on the fly. The only way to create your own IMesh object is to call Mesh.

IMeshes only respond to one projected texture.
See the render.RenderFlashlights function and example that solves this problem.


IMesh:BuildFromTriangles( table vertexes )
Builds the mesh from a table mesh vertexes. When modifying a previously built mesh, your new mesh must match the vertex count! See Mesh and util. GetModelMeshes for examples. IMesh appears to have a limit of 65535 vertices. You should split your mesh into multiple meshes when above this limit. Exceeding the limit may lead to undefined rendering behavior.
Deletes the mesh and frees the memory used by it.
Renders the mesh with the active matrix.
Returns whether this IMesh is valid or not.