render.SetScissorRect

From GMod Wiki

Jump to: navigation, search
Function
Syntax render.SetScissorRect( Integer left, Integer top, Integer right, Integer bottom, Boolean enabled )
Where is this used?
Description:
Sets up the scissor rectangle on the screen. Anything outside this rectangle is clipped and not rendered. Useful for writing gui stuff.
Returns: nil
Part of Library: render
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Render.SetScissorRect]Render.SetScissorRect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionOnly draws things that are in the top-left half of the screen.
Used onNewerClient.png
Code
render.SetScissorRect( 0, 0, ScrW() / 2, ScrH() / 2, true )
OutputN/A


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox