editor: tile paint and collision strokes are one undo step, no collision option for tiles (visual-only model copy in the build), freed gl buffers and stale pick ids, export level as gltf/glb with textures and vertex colours

This commit is contained in:
MineTec committed 2026-11-07 11:57:22 +01:00
1 parent 59531a60b8
commit 2f22a56cec
30 files changed
+1737 -27

No files matched your search

+16
View File
@@ -277,6 +277,22 @@ behind: game look / editor).
(Ranges: several agents shared the CPU.) Scene conversion from WAD 160–290 ms. On any real GPU
this is far below 1 ms of GPU time; the CPU side is ~150 draw calls per frame.
## GPU resources (2026-11-07)
* `GlRenderer.dispose()` frees everything it created: batches, texture array, pick FBO, programs and
the dynamic `dynVao`/`dynVbo` (gizmo, overlays).
* Chunks that lose their last member are deleted with their batch (before: an empty chunk kept a
`Chunk` entry until the next full rebuild). Shared per-mesh batches (`meshBatches`, objects and
tiles without vertex colours) whose mesh no instance uses any more are freed once there are more
than 256 (limit doubles with the live count) – replaced meshes used to stay until a level switch.
* `Viewport.liveGlBuffers()` counts live VAO/VBO pairs of all batches (diagnostics).
`ui.view.GlLeakCheck` (test sources, X display): 3 rounds over Village 1 / world 4 / Village 2, each
load followed by 60 rounds of tile moves, object moves, delete + undo while rendering → the count
is identical per level in every round (84 / 87 / 76), 0 with no level loaded.
* `SceneRenderer` drops the pick ids of nodes that are no longer in the scene every 256 removals
(nodes that come back by undo get a new id; selected nodes keep theirs) – `SceneRendererIdsTest`.
Tiles marked "no collision" use a copy of their model mesh without the collision overlay.
## Known limits / next steps
* Only the first vertex colour frame and the primary tile model (no alt/swap models).