1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-11 12:25:26 +01:00

Add a bit of debug code around MapBlock refcounting

This commit is contained in:
sfan5
2025-07-24 14:18:38 +02:00
parent 39417cf7a7
commit 0c12c1f400
6 changed files with 74 additions and 31 deletions

View File

@@ -89,12 +89,20 @@ public:
void getBlocksInViewRange(v3s16 cam_pos_nodes,
v3s16 *p_blocks_min, v3s16 *p_blocks_max, float range=-1.0f);
void updateDrawList();
// @brief Calculate statistics about the map and keep the blocks alive
/// @brief clears m_drawlist and m_keeplist
void clearDrawList();
/// @brief Calculate statistics about the map and keep the blocks alive
void touchMapBlocks();
void updateDrawListShadow(v3f shadow_light_pos, v3f shadow_light_dir, float radius, float length);
void clearDrawListShadow();
// Returns true if draw list needs updating before drawing the next frame.
bool needsUpdateDrawList() { return m_needs_update_drawlist; }
void renderMap(video::IVideoDriver* driver, s32 pass);
void renderMapShadows(video::IVideoDriver *driver,