cam.Start2D

From GMod Wiki

Jump to: navigation, search
Function
Syntax cam.Start2D( )
Where is this used?
Description:
Begins the drawing on the 2d camera. This is almost always used with a render target from the render library. To set its position use render.SetViewPort with a target already stored.
Returns: nil
Part of Library: Cam
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Cam.Start2D]Cam.Start2D [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSets the viewport then draws on the view with 2d methods
Used onNewerClient.png
Code
 
render.SetViewPort( 0, 100, 50, 50 )
    cam.Start2D();
         draw.line( 10, 200 );
    cam.End2D(); 
 
OutputN/A

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox