Garry's Mod Wiki

render.DrawScreenQuad

  render.DrawScreenQuad( boolean applyPoster = false )

Description

Draws the current material set by render.SetMaterial to the whole screen. The color cannot be customized.

See also render.DrawScreenQuadEx.

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

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

Arguments

1 boolean applyPoster = false
If set to true, when rendering a poster the quad will be properly drawn in parts in the poster. This is used internally by some Post Processing effects. Certain special textures (frame buffer like textures) do not need this adjustment.

Example

Example usage, draws a wireframe texture onto the entire screen.

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