Move loading of SP shaders after downloading assets

This commit is contained in:
Benau 2019-07-24 01:35:15 +08:00
parent d24e253435
commit 3293196707
4 changed files with 10 additions and 2 deletions

View File

@ -994,6 +994,8 @@ void IrrDriver::applyResolutionSettings()
{
m_perf_query[i]->reset();
}
if (CVS->isGLSL())
SP::loadShaders();
#endif
font_manager = new FontManager();

View File

@ -580,8 +580,6 @@ void init()
break;
}
}
loadShaders();
} // init
// ----------------------------------------------------------------------------

View File

@ -136,6 +136,8 @@ void resetEmptyFogColor();
// ----------------------------------------------------------------------------
void drawBoundingBoxes();
// ----------------------------------------------------------------------------
void loadShaders();
// ----------------------------------------------------------------------------
SPMesh* convertEVTStandard(irr::scene::IMesh* mesh,
const irr::video::SColor* color = NULL);
// ----------------------------------------------------------------------------

View File

@ -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();