surface.SetMaterial

From Garry's Mod
Jump to: navigation, search
 surface.SetMaterial( )

Description

Sets the material to be used in all upcoming draw operations using the surface library.

Not to be confused with render.SetMaterial.

See also surface.SetTexture.

WARNING

Material function calls are expensive to be done inside this function or inside rendering context, you should be caching the results of Material calls

Arguments

IMaterial material

The material to be used.
Personal tools
Navigation