mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
deleteDefaultShaders() does nothing
This commit is contained in:
@@ -602,16 +602,12 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
|
||||
@Override
|
||||
public void dispose() { // PGraphics
|
||||
super.dispose();
|
||||
|
||||
if (asyncPixelReader != null) {
|
||||
asyncPixelReader.dispose();
|
||||
asyncPixelReader = null;
|
||||
}
|
||||
|
||||
if (primaryGraphics) {
|
||||
deleteDefaultShaders();
|
||||
} else {
|
||||
if (!primaryGraphics) {
|
||||
deleteSurfaceTextures();
|
||||
FrameBuffer ofb = offscreenFramebuffer;
|
||||
FrameBuffer mfb = multisampleFramebuffer;
|
||||
@@ -624,6 +620,8 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
|
||||
pgl.dispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -6996,20 +6994,6 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
|
||||
|
||||
protected void deleteDefaultShaders() {
|
||||
// The default shaders contains references to the PGraphics object that
|
||||
// creates them, so when restarting the renderer, those references should
|
||||
// disappear.
|
||||
defColorShader = null;
|
||||
defTextureShader = null;
|
||||
defLightShader = null;
|
||||
defTexlightShader = null;
|
||||
defLineShader = null;
|
||||
defPointShader = null;
|
||||
maskShader = null;
|
||||
}
|
||||
|
||||
|
||||
protected PShader getPolyShader(boolean lit, boolean tex) {
|
||||
PShader shader;
|
||||
PGraphicsOpenGL ppg = getPrimaryPG();
|
||||
|
||||
Reference in New Issue
Block a user