Commit graph

3 commits

Author SHA1 Message Date
Racc 9aad2c8515 memory fun
Region.cpp/h: fix tile cache memory leaks by replacing raw malloc/free with RAII-compliant std::unique_ptr

Tesselator.cpp/h: fix thread-exit leaks by swapping unmanaged TlsAlloc for auto-cleaning C++17 thread_local std::unique_ptr (constructor now public)

LevelRenderer.cpp: fix heap corruption and array element leaks by changing 'delete' to 'delete[]' for chunk buffers
2026-03-11 19:48:09 +00:00
Racc 74a2c2e896 Optimize rendering checks and packing as well as min/max utilisation
Tesselator.h: Branchless min/max in Bounds via Min/Max; const ref on addBounds
Tesselator.cpp: clamp for color clamping; Min/Max initializer lists in packCompactQuad min/max finding and du/dv clamping
Chunk.cpp: bool[256] lookup table for occluder tile IDs in occlusion culling; [[unlikely]] hints on rebuild inner loop early-outs
LevelRenderer.cpp: __restrict + local caching in frustum clip(); [[likely]]/[[unlikely]] on chunk render loop continues
2026-03-08 21:30:04 +00:00
daoge_cmd b691c43c44 Initial commit 2026-03-01 12:16:08 +08:00