render.DrawScreenQuadEx

From Garry's Mod
Jump to: navigation, search
 render.DrawScreenQuadEx( )

Contents

Description

Draws the the current material set by render.SetMaterial to the area specified. Color cannot be customized.

See also render.DrawScreenQuad.

NOTE

This is a rendering function that requires a 2D rendering context.
This means that it will only work in hooks with a 2D rendering context.

Arguments

number startX

X start position of the rect.

Arguments

number startY

Y start position of the rect.

Arguments

number width

Width of the rect.

Arguments

number height

Height of the rect.

Examples

Example

Example usage, draws a 256x256 rectangle with the wireframe material.

local ourMat = Material( "models/wireframe" )
hook.Add( "HUDPaint", "example_hook", function()
	render.SetMaterial( ourMat )
	render.DrawScreenQuadEx( 100, 100, 256, 256 )
end )


Personal tools
Navigation