Garry's Mod Wiki

Garry's Mod Wiki

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

Description

Draws 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 )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...