From 26ffcbc6ce4138e04add5ae2b6132867e4174b98 Mon Sep 17 00:00:00 2001 From: benfry Date: Thu, 14 Aug 2008 02:01:32 +0000 Subject: [PATCH] threading problems worked out (?) --- core/src/processing/core/PApplet.java | 10 +++++----- core/src/processing/core/PConstants.java | 2 +- opengl/src/processing/opengl/PGraphicsOpenGL.java | 7 ++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 928fc604f..c15f1d154 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -1367,7 +1367,7 @@ in */ return; } - System.out.println("handleDraw() " + frameCount); + //System.out.println("handleDraw() " + frameCount); g.beginDraw(); @@ -1375,9 +1375,9 @@ in */ if (frameCount == 0) { try { - println("Calling setup()"); + //println("Calling setup()"); setup(); - println("Done with setup()"); + //println("Done with setup()"); } catch (RendererChangeException e) { // Give up, instead set the new renderer and re-attempt setup() @@ -1398,9 +1398,9 @@ in */ pmouseX = dmouseX; pmouseY = dmouseY; - println("Calling draw()"); + //println("Calling draw()"); draw(); - println("Done calling draw()"); + //println("Done calling draw()"); // dmouseX/Y is updated only once per frame (unlike emouseX/Y) dmouseX = mouseX; diff --git a/core/src/processing/core/PConstants.java b/core/src/processing/core/PConstants.java index 82dafdc0d..56289bcbe 100644 --- a/core/src/processing/core/PConstants.java +++ b/core/src/processing/core/PConstants.java @@ -336,7 +336,7 @@ public interface PConstants { static final int ENABLE_DEPTH_SORT = 7; static final int DISABLE_ERROR_REPORT = 8; static final int ENABLE_ACCURATE_TEXTURES = 9; - static final int DISABLE_AUTO_GZIP = 10; + //static final int DISABLE_AUTO_GZIP = 10; static final int HINT_COUNT = 11; } diff --git a/opengl/src/processing/opengl/PGraphicsOpenGL.java b/opengl/src/processing/opengl/PGraphicsOpenGL.java index 979c91b66..74aab6024 100644 --- a/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -329,11 +329,7 @@ public class PGraphicsOpenGL extends PGraphics3D { } else if (which == ENABLE_OPENGL_2X_SMOOTH) { if (!opengl2X) { - //parent.remove(canvas); - //canvas.setLocation(width, 0); - //canvas = null; - //releaseContext(); - //drawable = null; + releaseContext(); context.destroy(); context = null; allocate(); @@ -344,6 +340,7 @@ public class PGraphicsOpenGL extends PGraphics3D { //canvas.setLocation(width, 0); //parent.remove(canvas); //canvas = null; + releaseContext(); context.destroy(); context = null; allocate();