mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove dead code behind Irrlicht version checks
This commit is contained in:
parent
2dafce6206
commit
3bafbaac49
11 changed files with 14 additions and 133 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue