surface.DrawTexturedRect
Example
Draws a 512x512 textured rectangle with the wireframe texture.
-- Calling Material() every frame is quite expensive
-- So we call it once, outside of any hooks, and cache the result in a local variable
local ourMat = Material( "models/wireframe" )
hook.Add( "HUDPaint", "PutAUniqueHookNameHere", function()
surface.SetDrawColor( 255, 255, 255, 255 ) -- Set the drawing color
surface.SetMaterial( ourMat ) -- Use our cached material
surface.DrawTexturedRect( 0, 0, 512, 512 ) -- Actually draw the rectangle
end )