From 23b1a91e827b4779aedd4b1577b5c882ef6073c8 Mon Sep 17 00:00:00 2001 From: benfry Date: Sun, 27 Feb 2005 22:18:28 +0000 Subject: [PATCH] working on opengl and getting things straightened out --- processing/app/PdeMessageSiphon.java | 14 +++++++------- processing/app/PdeRuntime.java | 7 ++++++- processing/core/PApplet.java | 5 ----- processing/core/PGraphics2.java | 3 ++- processing/core/PImage.java | 6 +++--- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/processing/app/PdeMessageSiphon.java b/processing/app/PdeMessageSiphon.java index eaf82bc42..5b90368b3 100644 --- a/processing/app/PdeMessageSiphon.java +++ b/processing/app/PdeMessageSiphon.java @@ -17,8 +17,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -43,7 +43,7 @@ class PdeMessageSiphon implements Runnable { } - public void run() { + public void run() { try { // process data until we hit EOF; this will happily block // (effectively sleeping the thread) until new data comes in. @@ -51,7 +51,7 @@ class PdeMessageSiphon implements Runnable { // String currentLine; while ((currentLine = streamReader.readLine()) != null) { - consumer.message(currentLine); + consumer.message(currentLine + "\n"); } thread = null; @@ -59,12 +59,12 @@ class PdeMessageSiphon implements Runnable { // Fairly common exception during shutdown thread = null; - } catch (Exception e) { - // On Linux and sometimes on Mac OS X, a "bad file descriptor" + } catch (Exception e) { + // On Linux and sometimes on Mac OS X, a "bad file descriptor" // message comes up when closing an applet that's run externally. // That message just gets supressed here.. String mess = e.getMessage(); - if ((mess != null) && + if ((mess != null) && (mess.indexOf("Bad file descriptor") != -1)) { //if (e.getMessage().indexOf("Bad file descriptor") == -1) { //System.err.println("PdeMessageSiphon err " + e); diff --git a/processing/app/PdeRuntime.java b/processing/app/PdeRuntime.java index 2e0d5df18..506035d1f 100644 --- a/processing/app/PdeRuntime.java +++ b/processing/app/PdeRuntime.java @@ -332,11 +332,16 @@ public class PdeRuntime implements PdeMessageConsumer { // always shove out the mesage, since it might not fall under // the same setup as we're expecting System.err.print(s); + //System.err.println("[" + s.length() + "] " + s); System.err.flush(); // if s.length <=2, ignore it because that probably means // that it's just the platform line-terminators. - if (s.length() < 2) return; + //if (s.length() < 2) return; + + // annoying, because it seems as though the terminators + // aren't being sent properly + //System.err.println(s); //if (newMessage && s.length() > 2) { if (newMessage) { diff --git a/processing/core/PApplet.java b/processing/core/PApplet.java index 55e3df330..ac710f828 100644 --- a/processing/core/PApplet.java +++ b/processing/core/PApplet.java @@ -4399,11 +4399,6 @@ v PApplet.this.stop(); } - public void pixelsUpdated() { - g.pixelsUpdated(); - } - - public int get(int x, int y) { return g.get(x, y); } diff --git a/processing/core/PGraphics2.java b/processing/core/PGraphics2.java index 6dce69ddc..34ed81aee 100644 --- a/processing/core/PGraphics2.java +++ b/processing/core/PGraphics2.java @@ -532,7 +532,8 @@ public class PGraphics2 extends PGraphics { who.pixels, who.my1*who.width + who.mx1, // offset for copy who.width); // scan size - who.pixelsUpdated(); + //who.pixelsUpdated(); + who.modified = false; } int x2 = (int) (x + w); diff --git a/processing/core/PImage.java b/processing/core/PImage.java index efc748840..ca051f12e 100644 --- a/processing/core/PImage.java +++ b/processing/core/PImage.java @@ -345,13 +345,13 @@ public class PImage implements PConstants, Cloneable { } - public void pixelsUpdated() { + //public void pixelsUpdated() { //mx1 = Integer.MAX_VALUE; //my1 = Integer.MAX_VALUE; //mx2 = -Integer.MAX_VALUE; //my2 = -Integer.MAX_VALUE; - modified = false; - } + //modified = false; + //} //////////////////////////////////////////////////////////////