mirror of
https://github.com/minetest/minetest.git
synced 2024-12-04 21:43:44 +01:00
Remove HW_buffer_counter after IrrlichtMt fix to remove HWBufferMap (#12232)
Keep code and use version check instead, for backwards compatibility
This commit is contained in:
parent
beea8deeb5
commit
677dc2c155
@ -907,7 +907,10 @@ private:
|
|||||||
|
|
||||||
bool m_does_lost_focus_pause_game = false;
|
bool m_does_lost_focus_pause_game = false;
|
||||||
|
|
||||||
|
#if IRRLICHT_VERSION_MT_REVISION < 5
|
||||||
int m_reset_HW_buffer_counter = 0;
|
int m_reset_HW_buffer_counter = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_TOUCHSCREENGUI
|
#ifdef HAVE_TOUCHSCREENGUI
|
||||||
bool m_cache_hold_aux1;
|
bool m_cache_hold_aux1;
|
||||||
#endif
|
#endif
|
||||||
@ -3988,6 +3991,7 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime,
|
|||||||
/*
|
/*
|
||||||
==================== End scene ====================
|
==================== End scene ====================
|
||||||
*/
|
*/
|
||||||
|
#if IRRLICHT_VERSION_MT_REVISION < 5
|
||||||
if (++m_reset_HW_buffer_counter > 500) {
|
if (++m_reset_HW_buffer_counter > 500) {
|
||||||
/*
|
/*
|
||||||
Periodically remove all mesh HW buffers.
|
Periodically remove all mesh HW buffers.
|
||||||
@ -4009,6 +4013,7 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime,
|
|||||||
driver->removeAllHardwareBuffers();
|
driver->removeAllHardwareBuffers();
|
||||||
m_reset_HW_buffer_counter = 0;
|
m_reset_HW_buffer_counter = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
driver->endScene();
|
driver->endScene();
|
||||||
|
|
||||||
|
@ -1198,12 +1198,14 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
|
|||||||
MapBlockMesh::~MapBlockMesh()
|
MapBlockMesh::~MapBlockMesh()
|
||||||
{
|
{
|
||||||
for (scene::IMesh *m : m_mesh) {
|
for (scene::IMesh *m : m_mesh) {
|
||||||
|
#if IRRLICHT_VERSION_MT_REVISION < 5
|
||||||
if (m_enable_vbo) {
|
if (m_enable_vbo) {
|
||||||
for (u32 i = 0; i < m->getMeshBufferCount(); i++) {
|
for (u32 i = 0; i < m->getMeshBufferCount(); i++) {
|
||||||
scene::IMeshBuffer *buf = m->getMeshBuffer(i);
|
scene::IMeshBuffer *buf = m->getMeshBuffer(i);
|
||||||
RenderingEngine::get_video_driver()->removeHardwareBuffer(buf);
|
RenderingEngine::get_video_driver()->removeHardwareBuffer(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
m->drop();
|
m->drop();
|
||||||
}
|
}
|
||||||
delete m_minimap_mapblock;
|
delete m_minimap_mapblock;
|
||||||
|
Loading…
Reference in New Issue
Block a user