Release Navara overlay targets and sprite images on repeated globe switches

This commit is contained in:
German Khokhlov committed 2026-11-03 05:04:38 +04:00
1 parent 160e445677
commit 14f7b32537
4 files changed
+118 -1

No files matched your search

+11
View File
@@ -43,6 +43,17 @@ class GevOverlayEffectDesc extends EffectDesc {
);
}
onDestroy() {
// Navara removes the pass from its composer; our pass owns its GPU target
// and context event handlers until it is explicitly disposed.
const pass = this.raw?.rawPass;
try {
super.onDestroy();
} finally {
pass?.dispose();
}
}
// Each drawn frame: the scene depth the overlays test against, then each
// overlay's own per-frame work (pixel footprint, origin, viewport).
update(time) {