mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Reorganize ClientMap rendering code for a bit more performance
- Don't select blocks for drawing in every frame - Sort meshbuffers by material before drawing
This commit is contained in:
parent
0e6f7a21c6
commit
ee2d9d973a
6 changed files with 281 additions and 101 deletions
|
@ -1468,8 +1468,8 @@ void Map::timerUpdate(float dtime, float unload_timeout,
|
|||
MapBlock *block = (*i);
|
||||
|
||||
block->incrementUsageTimer(dtime);
|
||||
|
||||
if(block->getUsageTimer() > unload_timeout)
|
||||
|
||||
if(block->refGet() == 0 && block->getUsageTimer() > unload_timeout)
|
||||
{
|
||||
v3s16 p = block->getPos();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue