"L. Spiro Engine"
|
00001 00016 #ifndef __LSG_OPENGLCUBETEXTURE_H__ 00017 #define __LSG_OPENGLCUBETEXTURE_H__ 00018 00019 #include "../LSGGraphicsLib.h" 00020 #include "../Texture/LSGTextureBase.h" 00021 #include "LSGOpenGlStandardTexture.h" 00022 00023 #ifdef LSG_OGL 00024 00025 namespace lsg { 00026 00033 class COpenGlCubeTexture : public CTextureBase { 00034 public : 00035 // == Various constructors. 00036 LSE_CALLCTOR COpenGlCubeTexture(); 00037 virtual LSE_CALLCTOR ~COpenGlCubeTexture(); 00038 00039 00040 // == Functions. 00044 LSVOID LSE_CALL Reset(); 00045 00053 LSBOOL LSE_CALL SetAsRenderTarget( LSUINT32 _ui32Face ) const; 00054 00058 LSVOID LSE_CALL EndAsRenderTarget() const; 00059 00060 00061 protected : 00062 // == Members. 00066 CImage m_iFaces[6]; 00067 00071 GLuint m_uiTexture; 00072 00076 GLuint m_uiFrameBuffer; 00077 00081 GLuint m_uiRenderBuffer; 00082 00083 00084 // == Functions. 00088 LSVOID LSE_CALL ResetApi(); 00089 00095 LSBOOL LSE_CALL CreateApiTexture(); 00096 00097 00098 private : 00099 typedef CTextureBase Parent; 00100 }; 00101 00102 00103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00104 // DEFINITIONS 00105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00106 00107 00108 } // namespace lsg 00109 00110 #endif // #ifdef LSG_OGL 00111 00112 #endif // __LSG_OPENGLCUBETEXTURE_H__