Garry's Mod Wiki

Revision Difference

surface.SetMaterial#512012

<function name="SetMaterial" parent="surface" type="libraryfunc">⤶ <description>⤶ Sets the material to be used in all upcoming draw operations using the surface library.⤶ ⤶ Not to be confused with <page>render.SetMaterial</page>.⤶ ⤶ See also <page>surface.SetTexture</page>.⤶ ⤶ <warning><page>Global.Material</page> function calls are expensive to be done inside this function or inside rendering context, you should be caching the results of <page>Global.Material</page> calls</warning>⤶ </description>⤶ <realm>Client and Menu</realm>⤶ <args>⤶ <arg name="material" type="IMaterial">The material to be used.</arg>⤶ </args>⤶ </function>⤶ ⤶