Properly cleanup (#1294)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2026-01-23 18:19:46 -08:00
1 parent f79774df65
commit 94254006df
3 files changed
+13 -2

No files matched your search

@@ -930,11 +930,21 @@ public class DeferredWorldRenderingPipeline implements WorldRenderingPipeline, R
// Destroy the composite rendering pipeline
//
// This destroys all the loaded composite programs as well.
prepareRenderer.destroy();
compositeRenderer.destroy();
deferredRenderer.destroy();
finalPassRenderer.destroy();
centerDepthSampler.destroy();
// Destroy shadow compute programs
if (shadowComputes != null) {
for (ComputeProgram compute : shadowComputes) {
if (compute != null) {
compute.destroy();
}
}
}
horizonRenderer.destroy();
// Make sure that any custom framebuffers are not bound before destroying render targets
@@ -957,7 +967,7 @@ public class DeferredWorldRenderingPipeline implements WorldRenderingPipeline, R
// Destroy custom textures and the static samplers (normals, specular, and noise)
customTextureManager.destroy();
// whitePixel.releaseId();
whitePixel.deleteGlTexture();
// Destroy custom images
for (GlImage image : customImages) {