"L. Spiro Engine"
Public Member Functions | Static Public Member Functions | Protected Attributes

lsg::CRenderTargetManagerBase Class Reference

Base for the class that manages render targets. More...

#include <LSGRenderTargetManagerBase.h>

Inheritance diagram for lsg::CRenderTargetManagerBase:
lsg::CDirectX11RenderTargetManager

List of all members.

Public Member Functions

LSBOOL LSE_CALL SetColorRenderTarget (CRenderTargetInterface *_prtiColorTarget, LSUINT32 _ui32Index)
LSVOID LSE_CALL RemoveColorRenderTarget (const CRenderTargetInterface *_prtiColorTarget)
LSVOID LSE_CALL RemoveColorRenderTargetsFromIndex (LSUINT32 _ui32Index)
LSVOID LSE_CALL SetDepthStencilRenderTarget (CRenderTargetInterface *_prtiDepthStencilTarget)
LSVOID LSE_CALL MainScreenTurnOn ()

Static Public Member Functions

static LSE_INLINE LSUINT32 LSE_CALL ActualMrtMax ()

Protected Attributes

CRenderTargetInterfacem_prtiColorTargets [LSG_MRT_MAX]
CRenderTargetInterfacem_prtiDepthStencilTarget
LSUINT32 m_ui32TotalTargets
LSBOOL m_bDirty

Detailed Description

Base for the class that manages render targets.

Class CRenderTargetManagerBase Description: Base for the class that manages render targets. Render targets should be activated (as the target of a render) through this manager. It will not set the render targets immediately, but will activate them when the scene is actually rendered. This means there is no overhead in setting render targets redundantly, etc. When frame buffers are concerned (OpenGL and friends), it will automatically switch between the main screen frame buffer a hidden frame buffer meant for off-screen rendering and put the activated render targets there.


Member Function Documentation

LSE_INLINE LSUINT32 LSE_CALL lsg::CRenderTargetManagerBase::ActualMrtMax ( ) [static]

Gets the actual number of simultaneous color render targets available.

Returns:
Returns the min between LSG_MRT_MAX and the system metrics.
LSVOID LSE_CALL lsg::CRenderTargetManagerBase::MainScreenTurnOn ( )

Sets the main screen buffer as the current render target. This removes all custom color and depth/stencil render targets that have been set, which implicitly makes the manager activate the main screen buffer at render time.

LSVOID LSE_CALL lsg::CRenderTargetManagerBase::RemoveColorRenderTarget ( const CRenderTargetInterface _prtiColorTarget)

Removes a color render target from any slots into which it has been put.

Parameters:
_prtiColorTargetThe color render target to remove from all slots.
LSVOID LSE_CALL lsg::CRenderTargetManagerBase::RemoveColorRenderTargetsFromIndex ( LSUINT32  _ui32Index)

Removes color render targets starting from the given index until the highest valid index.

Parameters:
_ui32IndexIndex from which color render targets will inclusively be removed up to the highest valid index.
LSBOOL LSE_CALL lsg::CRenderTargetManagerBase::SetColorRenderTarget ( CRenderTargetInterface _prtiColorTarget,
LSUINT32  _ui32Index 
)

Puts a custom color render target into the given slot, which must be an index less than ActualMrtMax(). If NULL is passed, the given slot will have any render targets put into it removed.

Parameters:
_prtiColorTargetThe color render target to put into the given slot or NULL.
_ui32IndexThe slot into which to place the given render target or from which to remove its existing render target.
Returns:
Returns true if the given slot is within the valid range.
LSVOID LSE_CALL lsg::CRenderTargetManagerBase::SetDepthStencilRenderTarget ( CRenderTargetInterface _prtiDepthStencilTarget)

Puts a custom depth/stencil render target into the depth/stencil render target slot.

Parameters:
_prtiDepthStencilTargetThe depth/stencil render target to put into the depth/stencil slot.

Member Data Documentation

Are we dirty?

The activated render targets. If none are activated, the front buffer will be activated at render-time.

The activated depth/stencil render targets.

The total number of render targets activated.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator