"L. Spiro Engine"
|
00001 00020 #ifndef __LSG_RENDERTARGETMANAGERBASE_H__ 00021 #define __LSG_RENDERTARGETMANAGERBASE_H__ 00022 00023 #include "../LSGGraphicsLib.h" 00024 #include "../Fnd/LSGFnd.h" 00025 #include "LSGColorRenderTarget.h" 00026 00027 namespace lsg { 00028 00029 // == Enumerations. 00035 enum { 00036 LSG_MRT_MAX = 16 00037 }; 00038 00049 class CRenderTargetManagerBase { 00050 public : 00051 // == Functions. 00061 LSBOOL LSE_CALL SetColorRenderTarget( CRenderTargetInterface * _prtiColorTarget, LSUINT32 _ui32Index ); 00062 00068 LSVOID LSE_CALL RemoveColorRenderTarget( const CRenderTargetInterface * _prtiColorTarget ); 00069 00076 LSVOID LSE_CALL RemoveColorRenderTargetsFromIndex( LSUINT32 _ui32Index ); 00077 00083 LSVOID LSE_CALL SetDepthStencilRenderTarget( CRenderTargetInterface * _prtiDepthStencilTarget ); 00084 00090 LSVOID LSE_CALL MainScreenTurnOn(); 00091 00097 static LSE_INLINE LSUINT32 LSE_CALL ActualMrtMax(); 00098 00099 00100 protected : 00101 // == Various constructors. 00102 LSE_CALLCTOR CRenderTargetManagerBase(); 00103 00104 00105 // == Members. 00110 CRenderTargetInterface * m_prtiColorTargets[LSG_MRT_MAX]; 00111 00115 CRenderTargetInterface * m_prtiDepthStencilTarget; 00116 00120 LSUINT32 m_ui32TotalTargets; 00121 00125 LSBOOL m_bDirty; 00126 }; 00127 00128 00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00130 // DEFINITIONS 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00132 // == Functions. 00138 LSE_INLINE LSUINT32 LSE_CALL CRenderTargetManagerBase::ActualMrtMax() { 00139 return CStd::Min<LSUINT32>( CFnd::GetMetrics().ui32MaxRenderTargets, LSG_MRT_MAX ); 00140 } 00141 00142 } // namespace lsg 00143 00144 #endif // __LSG_RENDERTARGETMANAGERBASE_H__