diff --git a/core/PConstants.java b/core/PConstants.java index 7850694f6..8431a86c7 100644 --- a/core/PConstants.java +++ b/core/PConstants.java @@ -233,8 +233,9 @@ public interface PConstants { static final int NEW_GRAPHICS = 2; static final int DISABLE_TEXT_SMOOTH = 3; static final int DISABLE_SMOOTH_HACK = 4; + static final int NO_DEPTH_TEST = 5; - static final int HINT_COUNT = 5; + static final int HINT_COUNT = 6; ////////////////////////////////////////////////////////////// diff --git a/core/PGraphics.java b/core/PGraphics.java index 01672d5de..a756ca0bb 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -44,11 +44,11 @@ public class PGraphics extends PImage implements PConstants { int pixelCount; //public int pixels[]; // wtf? appletviewer wants this pubic - int stencil[]; // stencil buffer used to antialias polygons - float zbuffer[]; + public int stencil[]; // stencil buffer used to antialias polygons + public float zbuffer[]; //boolean zbufferTainted; - boolean depthTest; + //boolean depthTest; //int frameCount; @@ -439,7 +439,7 @@ public class PGraphics extends PImage implements PConstants { */ public void defaults() { //frameCount = 0; - depthTest = true; + //depthTest = true; colorMode(RGB, TFF); fill(TFF); stroke(0); diff --git a/core/PImage.java b/core/PImage.java index 11aa2b5b8..2ed466c62 100644 --- a/core/PImage.java +++ b/core/PImage.java @@ -64,10 +64,10 @@ public class PImage implements PConstants, Cloneable { // note that RGB images still require 0xff in the high byte // because of how they'll be manipulated by other functions - int format; + public int format; - int pixels[]; - int width, height; + public int pixels[]; + public int width, height; // would scan line be useful? maybe for pow of 2 gl textures // note! inherited by PGraphics diff --git a/core/PPolygon.java b/core/PPolygon.java index 65b03dcf8..7a76dee6f 100644 --- a/core/PPolygon.java +++ b/core/PPolygon.java @@ -153,7 +153,7 @@ public class PPolygon implements PConstants { pixels = parent.pixels; zbuffer = parent.zbuffer; - noDepthTest = !parent.depthTest; + noDepthTest = parent.hints[NO_DEPTH_TEST]; //!parent.depthTest; smoothing = parent.smooth; // by default, text turns on smoothing for the textures diff --git a/todo.txt b/todo.txt index f12f881b9..6421801f8 100644 --- a/todo.txt +++ b/todo.txt @@ -234,6 +234,8 @@ X modify preproc to handle "void setup" -> "public void setup" o preproc bug: text(String.valueOf(i+1), left + i*20, top); o unexpected token "String" +OutOfMemoryError still showing up when no CR at end of app + _ casting working properly.. int() maps to toInt()? _ what is performance hit for this thing? _ processing.app -> PdeBase, PdeEditor..