Revision Difference
IMesh:Draw#511685
<function name="Draw" parent="IMesh" type="classfunc">⤶
<description>Renders the mesh with the active matrix.</description>⤶
<realm>Client</realm>⤶
</function>⤶
⤶
<example>⤶
<description>⤶
Properly renders the mesh using the SENT's model matrix.⤶
⤶
&lt;pre class="inline"&gt;self.Mesh&lt;/pre&gt; in this case is the <page>IMesh</page>.⤶
</description>⤶
<code>⤶
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⤶
</code>⤶
⤶
</example>