"L. Spiro Engine"
|
00001 00016 #ifndef __LSG_CUBETEXTURE_H__ 00017 #define __LSG_CUBETEXTURE_H__ 00018 00019 #include "../LSGGraphicsLib.h" 00020 #ifdef LSG_DX9 00021 #include "../DirectX/LSGDirectX9CubeTexture.h" 00022 #endif // #ifdef LSG_DX9 00023 #ifdef LSG_DX10 00024 #include "../DirectX/LSGDirectX10CubeTexture.h" 00025 #endif // #ifdef LSG_DX10 00026 #ifdef LSG_DX11 00027 #include "../DirectX/LSGDirectX11CubeTexture.h" 00028 #endif // #ifdef LSG_DX11 00029 #ifdef LSG_OGLES 00030 #include "../OpenGLES/LSGOpenGlEsCubeTexture.h" 00031 #endif // #ifdef LSG_OGLES 00032 #ifdef LSG_OGL 00033 #include "../OpenGL/LSGOpenGlCubeTexture.h" 00034 #endif // #ifdef LSG_OGL 00035 #include "SharedPtr/LSTLSharedPtr.h" 00036 00037 namespace lsg { 00038 00045 class CCubeTexture : public 00046 #ifdef LSG_DX9 00047 CDirectX9CubeTexture 00048 #endif // #ifdef LSG_DX9 00049 #ifdef LSG_DX10 00050 CDirectX10CubeTexture 00051 #endif // #ifdef LSG_DX10 00052 #ifdef LSG_DX11 00053 CDirectX11CubeTexture 00054 #endif // #ifdef LSG_DX11 00055 #ifdef LSG_OGL 00056 COpenGlCubeTexture 00057 #endif // #ifdef LSG_OGL 00058 #ifdef LSG_OGLES 00059 COpenGlEsCubeTexture 00060 #endif // #ifdef LSG_OGLES 00061 { 00062 public : 00063 // == Various constructors. 00064 LSE_CALLCTOR CCubeTexture(); 00065 virtual LSE_CALLCTOR ~CCubeTexture(); 00066 00067 00068 // == Functions. 00079 LSBOOL LSE_CALL CreateCubeTexture( LSUINT32 _ui32Size, LSUINT32 _ui32Usage, 00080 LSI_PIXEL_FORMAT _pfFormat = LSI_PF_R8G8B8, 00081 LSBOOL _bMipMaps = true, CAllocator * _paAllocator = NULL ); 00082 00094 LSBOOL LSE_CALL LoadCubeTextureFromMemory( const LSVOID ** _ppvBuffers, LSUINT32 _ui32Sizes[6], LSUINT32 _ui32Usage, 00095 LSBOOL _bMipMaps = true, CAllocator * _paAllocator = NULL ); 00096 00107 LSBOOL LSE_CALL LoadCubeTextureFromFiles( const LSCHAR * _pcPaths[6], LSUINT32 _ui32Usage, 00108 LSBOOL _bMipMaps = true, CAllocator * _paAllocator = NULL ); 00109 00116 LSBOOL LSE_CALL Finalize(); 00117 00118 00119 protected : 00120 // == Members. 00124 LSI_PIXEL_FORMAT m_pfFormat; 00125 00126 00127 00128 // == Functions. 00137 LSVOID LSE_CALL SetInternal( LSUINT32 _ui32Size, LSUINT32 _ui32Usage, 00138 LSI_PIXEL_FORMAT _pfFormat, 00139 LSBOOL _bMipMaps ); 00140 00141 00142 private : 00143 #ifdef LSG_DX9 00144 typedef CDirectX9CubeTexture Parent; 00145 #endif // #ifdef LSG_DX9 00146 #ifdef LSG_DX10 00147 typedef CDirectX10CubeTexture Parent; 00148 #endif // #ifdef LSG_DX10 00149 #ifdef LSG_DX11 00150 typedef CDirectX11CubeTexture Parent; 00151 #endif // #ifdef LSG_DX11 00152 #ifdef LSG_OGL 00153 typedef COpenGlCubeTexture Parent; 00154 #endif // #ifdef LSG_OGL 00155 #ifdef LSG_OGLES 00156 typedef COpenGlEsCubeTexture Parent; 00157 #endif // #ifdef LSG_OGLES 00158 }; 00159 00160 00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00162 // DEFINITIONS 00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00164 // == Types. 00168 typedef CSharedPtr<CCubeTexture> CSharedCubeTexPtr; 00169 00170 } // namespace lsg 00171 00172 #endif // __LSG_CUBETEXTURE_H__