"L. Spiro Engine"
|
Base for the class that manages render targets. More...
#include <LSGRenderTargetManagerBase.h>
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 | |
CRenderTargetInterface * | m_prtiColorTargets [LSG_MRT_MAX] |
CRenderTargetInterface * | m_prtiDepthStencilTarget |
LSUINT32 | m_ui32TotalTargets |
LSBOOL | m_bDirty |
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.
LSE_INLINE LSUINT32 LSE_CALL lsg::CRenderTargetManagerBase::ActualMrtMax | ( | ) | [static] |
Gets the actual number of simultaneous color render targets available.
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.
_prtiColorTarget | The 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.
_ui32Index | Index 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.
_prtiColorTarget | The color render target to put into the given slot or NULL. |
_ui32Index | The slot into which to place the given render target or from which to remove its existing render target. |
LSVOID LSE_CALL lsg::CRenderTargetManagerBase::SetDepthStencilRenderTarget | ( | CRenderTargetInterface * | _prtiDepthStencilTarget | ) |
Puts a custom depth/stencil render target into the depth/stencil render target slot.
_prtiDepthStencilTarget | The depth/stencil render target to put into the depth/stencil slot. |
LSBOOL lsg::CRenderTargetManagerBase::m_bDirty [protected] |
Are we dirty?
CRenderTargetInterface* lsg::CRenderTargetManagerBase::m_prtiColorTargets[LSG_MRT_MAX] [protected] |
The activated render targets. If none are activated, the front buffer will be activated at render-time.
The activated depth/stencil render targets.
LSUINT32 lsg::CRenderTargetManagerBase::m_ui32TotalTargets [protected] |
The total number of render targets activated.