diff options
| author | sfan5 <sfan5@live.de> | 2023-02-18 00:29:34 +0100 |
|---|---|---|
| committer | sfan5 <sfan5@live.de> | 2023-02-18 16:46:51 +0100 |
| commit | 3bafbaac49e3d5d1d633b26f60fd4e919399819b (patch) | |
| tree | b70231e8eb18fdf8b3d2cf2007919a5e46540db0 /src/client | |
| parent | 2dafce6206dfcf02f3c31cf1abe819e901489704 (diff) | |
| download | minetest-3bafbaac49e3d5d1d633b26f60fd4e919399819b.tar.xz | |
Remove dead code behind Irrlicht version checks
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/game.cpp | 27 | ||||
| -rw-r--r-- | src/client/mapblock_mesh.cpp | 8 | ||||
| -rw-r--r-- | src/client/sky.cpp | 5 |
3 files changed, 0 insertions, 40 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index 122e25d8c..94a09537a 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1008,10 +1008,6 @@ private: // this happens in pause menu in singleplayer bool m_is_paused = false; -#if IRRLICHT_VERSION_MT_REVISION < 5 - int m_reset_HW_buffer_counter = 0; -#endif - #ifdef HAVE_TOUCHSCREENGUI bool m_cache_hold_aux1; bool m_touch_use_crosshair; @@ -4153,29 +4149,6 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime, /* ==================== End scene ==================== */ -#if IRRLICHT_VERSION_MT_REVISION < 5 - if (++m_reset_HW_buffer_counter > 500) { - /* - Periodically remove all mesh HW buffers. - - Work around for a quirk in Irrlicht where a HW buffer is only - released after 20000 iterations (triggered from endScene()). - - Without this, all loaded but unused meshes will retain their HW - buffers for at least 5 minutes, at which point looking up the HW buffers - becomes a bottleneck and the framerate drops (as much as 30%). - - Tests showed that numbers between 50 and 1000 are good, so picked 500. - There are no other public Irrlicht APIs that allow interacting with the - HW buffers without tracking the status of every individual mesh. - - The HW buffers for _visible_ meshes will be reinitialized in the next frame. - */ - infostream << "Game::updateFrame(): Removing all HW buffers." << std::endl; - driver->removeAllHardwareBuffers(); - m_reset_HW_buffer_counter = 0; - } -#endif driver->endScene(); diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp index e6ccb764f..dd663d59e 100644 --- a/src/client/mapblock_mesh.cpp +++ b/src/client/mapblock_mesh.cpp @@ -1395,14 +1395,6 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset): MapBlockMesh::~MapBlockMesh() { for (scene::IMesh *m : m_mesh) { -#if IRRLICHT_VERSION_MT_REVISION < 5 - if (m_enable_vbo) { - for (u32 i = 0; i < m->getMeshBufferCount(); i++) { - scene::IMeshBuffer *buf = m->getMeshBuffer(i); - RenderingEngine::get_video_driver()->removeHardwareBuffer(buf); - } - } -#endif m->drop(); } for (MinimapMapblock *block : m_minimap_mapblocks) diff --git a/src/client/sky.cpp b/src/client/sky.cpp index 0ab7398f2..aacc47250 100644 --- a/src/client/sky.cpp +++ b/src/client/sky.cpp @@ -39,13 +39,8 @@ static video::SMaterial baseMaterial() { video::SMaterial mat; mat.Lighting = false; -#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8 mat.ZBuffer = video::ECFN_DISABLED; mat.ZWriteEnable = video::EZW_OFF; -#else - mat.ZWriteEnable = false; - mat.ZBuffer = video::ECFN_NEVER; -#endif mat.AntiAliasing = 0; mat.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE; mat.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE; |
