Garry's Mod Wiki

IMesh:Draw

IMesh:Draw()

Description

Renders the mesh with the active matrix.

Example

Properly renders the mesh using the SENT's model matrix.

self.Mesh in this case is the IMesh.

local myMaterial = Material( "models/wireframe" ) -- models/debug/debugwhite function ENT:Draw() if ( self.Mesh ) then render.SetMaterial( myMaterial ) cam.PushModelMatrix( self:GetWorldTransformMatrix() ) self.Mesh:Draw() cam.PopModelMatrix() end -- Other code end

Page Links


Special Pages


Wikis

?

Render Time: 32ms

Session 0
DB GetPage 4
Generate Html 4
SaveChanges 10
Render Body 0
Render Sidebar 12