render.GetRenderTarget

From GMod Wiki

Jump to: navigation, search
Function
Syntax render.GetRenderTarget( )
Where is this used?
Description:
Returns the current render target being used.
Returns: ITexture
Part of Library: render
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Render.GetRenderTarget]Render.GetRenderTarget [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionChange the render target, do some processing and revert the render target.
Used onNewerClient.png
Code
local tex_Bloom0 = render.GetBloomTex0() 
local OldRT = render.GetRenderTarget(); // Grab the current render target
render.SetRenderTarget( tex_Bloom0 );// Set to a new render target
render.DrawScreenQuad(); // Draw the screen to the new render target
render.SetRenderTarget( OldRT );  // Restore the old render target
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox