X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=radiant%2Frenderstate.cpp;h=2f5596d13f23ba14d20860bc0d9d0845b6d61ef5;hp=b648c92d3c277182d6f39e61f73eaa63332eae22;hb=23cc0661e04d41ac4db3f66f873ae1bbe6aebe25;hpb=8649824a42de3033b37e7fa42d21094f8bb59bc1 diff --git a/radiant/renderstate.cpp b/radiant/renderstate.cpp index b648c92d..2f5596d1 100644 --- a/radiant/renderstate.cpp +++ b/radiant/renderstate.cpp @@ -2629,7 +2629,32 @@ void OpenGLShader::construct(const char* name) #include "modulesystem/singletonmodule.h" #include "modulesystem/moduleregistry.h" -class ShaderCacheDependencies : public GlobalShadersModuleRef, public GlobalTexturesModuleRef +class OpenGLStateLibraryAPI +{ + OpenGLStateMap m_stateMap; +public: + typedef OpenGLStateLibrary Type; + STRING_CONSTANT(Name, "*"); + + OpenGLStateLibraryAPI() + { + g_openglStates = &m_stateMap; + } + ~OpenGLStateLibraryAPI() + { + g_openglStates = 0; + } + OpenGLStateLibrary* getTable() + { + return &m_stateMap; + } +}; + +typedef SingletonModule OpenGLStateLibraryModule; +typedef Static StaticOpenGLStateLibraryModule; +StaticRegisterModule staticRegisterOpenGLStateLibrary(StaticOpenGLStateLibraryModule::instance()); + +class ShaderCacheDependencies : public GlobalShadersModuleRef, public GlobalTexturesModuleRef, public GlobalOpenGLStateLibraryModuleRef { public: ShaderCacheDependencies() : @@ -2666,27 +2691,3 @@ typedef Static StaticShaderCacheModule; StaticRegisterModule staticRegisterShaderCache(StaticShaderCacheModule::instance()); -class OpenGLStateLibraryAPI -{ - OpenGLStateMap m_stateMap; -public: - typedef OpenGLStateLibrary Type; - STRING_CONSTANT(Name, "*"); - - OpenGLStateLibraryAPI() - { - g_openglStates = &m_stateMap; - } - ~OpenGLStateLibraryAPI() - { - g_openglStates = 0; - } - OpenGLStateLibrary* getTable() - { - return &m_stateMap; - } -}; - -typedef SingletonModule OpenGLStateLibraryModule; -typedef Static StaticOpenGLStateLibraryModule; -StaticRegisterModule staticRegisterOpenGLStateLibrary(StaticOpenGLStateLibraryModule::instance());