HAL::SetRenderTarget

HAL::SetRenderTarget
virtual bool SetRenderTarget(RenderTarget* target, bool setState = true);
Description

SetRenderTarget applies the primary output render target. This should be called before BeginDisplay, to have contents appear within the target. 

If not called before InitHAL, the HAL will attempt to create a default RenderTarget by querying the graphics API (when the platform allows this). When calling before InitHAL, ensure setState = false. 

Use setState = false if this render target is already set on the GPU (by the application) to avoid unnecessary render target changes. The bottom level render target cannot be set if it is already in display.

Parameters
Parameters 
Description 
RenderTarget* target 
The render target which is set as the current render target. 
bool setState = true 
A Boolean value used to set/unset the render target. 
Return Value

Returns true if the render target was created successfully; false otherwise.