Revision Difference
IMesh:Draw#524870
<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.
⤶
<pre class="inline">self.Mesh</pre> in this case is the <page>IMesh</page>.
⤶
`self.Mesh` 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>