mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-22 05:12:16 +00:00
Properly cleanup (#1294)
This commit is contained in:
1 parent
f79774df65
commit
94254006df
3 files changed
+13
-2
No files matched your search
@@ -104,7 +104,7 @@ public class GlFramebuffer extends GlResource {
|
||||
|
||||
@Override
|
||||
protected void destroyInternal() {
|
||||
OpenGlHelper.func_153184_g/*glDeleteFramebuffers*/(getGlId());
|
||||
OpenGlHelper.func_153174_h/*glDeleteFramebuffers*/(getGlId());
|
||||
}
|
||||
|
||||
public boolean isComplete() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -453,5 +453,6 @@ public class FinalPassRenderer {
|
||||
if (finalPass != null) {
|
||||
finalPass.destroy();
|
||||
}
|
||||
colorHolder.destroy();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user