"L. Spiro Engine"
|
00001 00016 #ifndef __LSG_OPENGLRENDERTARGET_H__ 00017 #define __LSG_OPENGLRENDERTARGET_H__ 00018 00019 #include "../LSGGraphicsLib.h" 00020 #include "../RenderTarget/LSGRenderTargetBase.h" 00021 00022 #ifdef LSG_OGL 00023 00024 namespace lsg { 00025 00032 class COpenGlRenderTarget : public CRenderTargetBase { 00033 friend class COpenGlRenderTargetManager; 00034 public : 00035 // == Various constructors. 00036 LSE_CALLCTOR COpenGlRenderTarget(); 00037 LSE_CALLCTOR ~COpenGlRenderTarget(); 00038 00039 00040 // == Functions. 00047 virtual LSBOOL LSE_CALL Activate( LSUINT32 _ui32Slot ); 00048 00056 static GLint LSE_CALL GetOpenGlInternalFormatRenderTarget( LSG_RENDER_TARGET_FORMAT _rtfFormat, LSBOOL _bStencil = false ); 00057 00065 static GLenum LSE_CALL GetOpenGlFormatRenderTarget( LSG_RENDER_TARGET_FORMAT _rtfFormat, LSBOOL _bStencil = false ); 00066 00074 static GLenum LSE_CALL GetOpenGlTypeRenderTarget( LSG_RENDER_TARGET_FORMAT _rtfFormat, LSBOOL _bStencil = false ); 00075 00076 00077 protected : 00078 // == Members. 00082 GLuint m_uiColorId; 00083 00084 00085 // == Functions. 00089 LSVOID LSE_CALL ResetApi(); 00090 00097 LSBOOL LSE_CALL CreateApiRenderTarget(); 00098 00105 virtual LSBOOL LSE_CALL SetAsColorRenderTarget( LSUINT32 _ui32Slot ) const; 00106 00110 virtual LSVOID LSE_CALL EndAsRenderTarget() const; 00111 }; 00112 00113 } // namespace lsg 00114 00115 #endif // #ifdef LSG_OGL 00116 00117 #endif // __LSG_OPENGLRENDERTARGET_H__