"L. Spiro Engine"
|
00001 00025 #ifndef __LSG_OPENGLCOMPILEDSHADERMANAGER_H__ 00026 #define __LSG_OPENGLCOMPILEDSHADERMANAGER_H__ 00027 00028 #include "../LSGGraphicsLib.h" 00029 #include "LSGOpenGlCompiledShader.h" 00030 #include "Map/LSTLMap.h" 00031 #include "String/LSTLStringList.h" 00032 00033 #if defined( LSG_OGL ) 00034 00035 namespace lsg { 00036 00052 class COpenGlCompiledShaderManager { 00053 public : 00054 // == Functions. 00060 static LSVOID LSE_CALL SetSharing( LSBOOL _bVal ); 00061 00070 static COpenGlCompiledShader * LSE_CALL CreateShader( const CString &_sShaderText, CShaderLanguageParser::LSG_SHADER_TYPES _stShaderType, CString &_sError ); 00071 00077 static LSVOID LSE_CALL DeleteShader( COpenGlCompiledShader * _pogcsShader ); 00078 00084 static LSUINT32 LSE_CALL DeleteUnreferencedShaders(); 00085 00086 00087 protected : 00088 // == Members. 00092 static LSBOOL m_bSharing; 00093 00097 static CMap<CString, COpenGlCompiledShader *> m_mShaders[CShaderLanguageParser::LSG_ST_TOTAL]; 00098 }; 00099 00100 } // namespace lsg 00101 00102 #endif // #if defined( LSG_OGL ) 00103 00104 #endif // __LSG_OPENGLCOMPILEDSHADERMANAGER_H__