deleteDefaultShaders() does nothing

This commit is contained in:
codeanticode
2015-10-22 21:43:59 -04:00
parent 129cbac2c2
commit 415e896b08
@@ -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();