Garry's Mod Wiki

render.DrawScreenQuadEx

render.DrawScreenQuadEx( number startX, number startY, number width, number height )

Description

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

See also render.DrawScreenQuad.

This is a rendering function that requires a 2d rendering context.

This means that it will only work in 2d Rendering Hooks.

Arguments

1 number startX
X start position of the rect.
2 number startY
Y start position of the rect.
3 number width
Width of the rect.
4 number height
Height of the rect.

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 )

Page Links


Special Pages


Wikis

?

Render Time: 89ms

DB GetPage 51
Generate Html 12
SaveChanges (1) 11
Render Body 0
Render Sidebar 12