surface.SetMaterial
From GMod Wiki
Function | |
Syntax |
surface.SetMaterial( Material material object ) Where is this used? |
Description: | |
Sets the material for all images drawn in its function until you set the material again. | |
Returns: | nil |
Part of Library: | surface |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Surface.SetMaterial]Surface.SetMaterial [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Example. |
---|---|
Used on | |
Code | surface.SetDrawColor( 255, 255, 255, 255 ) surface.SetMaterial( Material( "vgui/hud_pv" ) ) surface.DrawTexturedRect( ScrW() * 0.5, ScrH() * 0.5, 50, 50 ) |
Output | N/A |