diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index a8e87eccc..7833ace0b 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -994,6 +994,8 @@ void IrrDriver::applyResolutionSettings() { m_perf_query[i]->reset(); } + if (CVS->isGLSL()) + SP::loadShaders(); #endif font_manager = new FontManager(); diff --git a/src/graphics/sp/sp_base.cpp b/src/graphics/sp/sp_base.cpp index 01fb646eb..59c190a67 100644 --- a/src/graphics/sp/sp_base.cpp +++ b/src/graphics/sp/sp_base.cpp @@ -580,8 +580,6 @@ void init() break; } } - loadShaders(); - } // init // ---------------------------------------------------------------------------- diff --git a/src/graphics/sp/sp_base.hpp b/src/graphics/sp/sp_base.hpp index 26f954112..04a0dbb32 100644 --- a/src/graphics/sp/sp_base.hpp +++ b/src/graphics/sp/sp_base.hpp @@ -136,6 +136,8 @@ void resetEmptyFogColor(); // ---------------------------------------------------------------------------- void drawBoundingBoxes(); // ---------------------------------------------------------------------------- +void loadShaders(); +// ---------------------------------------------------------------------------- SPMesh* convertEVTStandard(irr::scene::IMesh* mesh, const irr::video::SColor* color = NULL); // ---------------------------------------------------------------------------- diff --git a/src/main.cpp b/src/main.cpp index 8e9341c92..2926faa89 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1745,7 +1745,13 @@ void initRest() #ifndef SERVER_ONLY addons_manager = NULL; if (!ProfileWorld::isNoGraphics()) + { + // Need to load shader after downloading assets as it reads prefilled + // textures + if (CVS->isGLSL()) + SP::loadShaders(); addons_manager = new AddonsManager(); + } #endif Online::ProfileManager::create();