mesh.Begin
From GMod Wiki
Function | |
Syntax |
mesh.Begin( Enum Primitive Type, Number Primitive Number ) Where is this used? |
Description: | |
Starts the process of defining a mesh. Must be finished with an accompanying call to mesh.End. This function should be called in the same places that the render functions are called; in an entity's Draw function, etc. | |
Returns: | nil |
Part of Library: | mesh |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Mesh.Begin]Mesh.Begin [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
CLIENT | 0000000000000000 | 00000000000000000 | MATERIAL_POINTS CLIENT | 0000000000000001 | 00000000000000001 | MATERIAL_LINES CLIENT | 0000000000000002 | 00000000000000010 | MATERIAL_TRIANGLES CLIENT | 0000000000000003 | 00000000000000011 | MATERIAL_TRIANGLE_STRIP CLIENT | 0000000000000004 | 00000000000000100 | MATERIAL_LINE_STRIP CLIENT | 0000000000000005 | 00000000000000101 | MATERIAL_LINE_LOOP CLIENT | 0000000000000006 | 00000000000000110 | MATERIAL_POLYGON CLIENT | 0000000000000007 | 00000000000000111 | MATERIAL_QUADS
- If you make a call to a mesh function that results in an error, your view may become quite messed up; things will render wrong, the skybox will go berserk, etc. In this case, you'll need to restart Garry's Mod to return to normal.
- It may be easier to use the cam library functions to position, rotate, and scale your mesh, rather than trying to calculate it yourself.