mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
fix: don't use RenderingEngine singleton when it's possible
This commit is contained in:
parent
5a02c376ea
commit
a93712458b
@ -1771,21 +1771,21 @@ void Client::afterContentReceived()
|
|||||||
|
|
||||||
// Rebuild inherited images and recreate textures
|
// Rebuild inherited images and recreate textures
|
||||||
infostream<<"- Rebuilding images and textures"<<std::endl;
|
infostream<<"- Rebuilding images and textures"<<std::endl;
|
||||||
RenderingEngine::draw_load_screen(text, guienv, m_tsrc, 0, 70);
|
m_rendering_engine->draw_load_screen(text, guienv, m_tsrc, 0, 70);
|
||||||
m_tsrc->rebuildImagesAndTextures();
|
m_tsrc->rebuildImagesAndTextures();
|
||||||
delete[] text;
|
delete[] text;
|
||||||
|
|
||||||
// Rebuild shaders
|
// Rebuild shaders
|
||||||
infostream<<"- Rebuilding shaders"<<std::endl;
|
infostream<<"- Rebuilding shaders"<<std::endl;
|
||||||
text = wgettext("Rebuilding shaders...");
|
text = wgettext("Rebuilding shaders...");
|
||||||
RenderingEngine::draw_load_screen(text, guienv, m_tsrc, 0, 71);
|
m_rendering_engine->draw_load_screen(text, guienv, m_tsrc, 0, 71);
|
||||||
m_shsrc->rebuildShaders();
|
m_shsrc->rebuildShaders();
|
||||||
delete[] text;
|
delete[] text;
|
||||||
|
|
||||||
// Update node aliases
|
// Update node aliases
|
||||||
infostream<<"- Updating node aliases"<<std::endl;
|
infostream<<"- Updating node aliases"<<std::endl;
|
||||||
text = wgettext("Initializing nodes...");
|
text = wgettext("Initializing nodes...");
|
||||||
RenderingEngine::draw_load_screen(text, guienv, m_tsrc, 0, 72);
|
m_rendering_engine->draw_load_screen(text, guienv, m_tsrc, 0, 72);
|
||||||
m_nodedef->updateAliases(m_itemdef);
|
m_nodedef->updateAliases(m_itemdef);
|
||||||
for (const auto &path : getTextureDirs()) {
|
for (const auto &path : getTextureDirs()) {
|
||||||
TextureOverrideSource override_source(path + DIR_DELIM + "override.txt");
|
TextureOverrideSource override_source(path + DIR_DELIM + "override.txt");
|
||||||
@ -1818,7 +1818,7 @@ void Client::afterContentReceived()
|
|||||||
m_script->on_client_ready(m_env.getLocalPlayer());
|
m_script->on_client_ready(m_env.getLocalPlayer());
|
||||||
|
|
||||||
text = wgettext("Done!");
|
text = wgettext("Done!");
|
||||||
RenderingEngine::draw_load_screen(text, guienv, m_tsrc, 0, 100);
|
m_rendering_engine->draw_load_screen(text, guienv, m_tsrc, 0, 100);
|
||||||
infostream<<"Client::afterContentReceived() done"<<std::endl;
|
infostream<<"Client::afterContentReceived() done"<<std::endl;
|
||||||
delete[] text;
|
delete[] text;
|
||||||
}
|
}
|
||||||
@ -1836,7 +1836,7 @@ float Client::getCurRate()
|
|||||||
|
|
||||||
void Client::makeScreenshot()
|
void Client::makeScreenshot()
|
||||||
{
|
{
|
||||||
irr::video::IVideoDriver *driver = RenderingEngine::get_video_driver();
|
irr::video::IVideoDriver *driver = m_rendering_engine->get_video_driver();
|
||||||
irr::video::IImage* const raw_image = driver->createScreenShot();
|
irr::video::IImage* const raw_image = driver->createScreenShot();
|
||||||
|
|
||||||
if (!raw_image)
|
if (!raw_image)
|
||||||
|
Loading…
Reference in New Issue
Block a user