diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2021-04-29 09:45:49 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2021-05-03 19:49:19 +0200 |
commit | a93712458b2f8914fdb43ec436c5caf908ba93b8 (patch) | |
tree | 68df0a52b055a3cf61248384da9c1b6f0a0fb566 /src | |
parent | 5a02c376ea5f2e7f1dd0a2bd4f08bf953ed4bfc8 (diff) | |
download | minetest-a93712458b2f8914fdb43ec436c5caf908ba93b8.tar.gz minetest-a93712458b2f8914fdb43ec436c5caf908ba93b8.tar.bz2 minetest-a93712458b2f8914fdb43ec436c5caf908ba93b8.zip |
fix: don't use RenderingEngine singleton when it's possible
Diffstat (limited to 'src')
-rw-r--r-- | src/client/client.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 2f4f2aac5..1a3a81378 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1771,21 +1771,21 @@ void Client::afterContentReceived() // Rebuild inherited images and recreate textures 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(); delete[] text; // Rebuild shaders infostream<<"- Rebuilding shaders"<<std::endl; 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(); delete[] text; // Update node aliases infostream<<"- Updating node aliases"<<std::endl; 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); for (const auto &path : getTextureDirs()) { TextureOverrideSource override_source(path + DIR_DELIM + "override.txt"); @@ -1818,7 +1818,7 @@ void Client::afterContentReceived() m_script->on_client_ready(m_env.getLocalPlayer()); 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; delete[] text; } @@ -1836,7 +1836,7 @@ float Client::getCurRate() 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(); if (!raw_image) |