From 261018afcc0965ac82693d98042f57de9d8db554 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Fri, 31 Aug 2012 13:35:36 +0000 Subject: [PATCH] Renamed stroke perspective hint --- core/src/processing/core/PConstants.java | 40 +++++++++---------- core/src/processing/opengl/PGraphics2D.java | 4 +- core/src/processing/opengl/PGraphics3D.java | 2 +- .../processing/opengl/PGraphicsOpenGL.java | 8 ++-- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/core/src/processing/core/PConstants.java b/core/src/processing/core/PConstants.java index 5a52d9d46..1a175a484 100644 --- a/core/src/processing/core/PConstants.java +++ b/core/src/processing/core/PConstants.java @@ -513,35 +513,35 @@ public interface PConstants { static final int ENABLE_NATIVE_FONTS = 1; static final int DISABLE_NATIVE_FONTS = -1; - static final int DISABLE_DEPTH_TEST = 2; - static final int ENABLE_DEPTH_TEST = -2; + static final int DISABLE_DEPTH_TEST = 2; + static final int ENABLE_DEPTH_TEST = -2; - static final int ENABLE_DEPTH_SORT = 3; - static final int DISABLE_DEPTH_SORT = -3; + static final int ENABLE_DEPTH_SORT = 3; + static final int DISABLE_DEPTH_SORT = -3; - static final int DISABLE_OPENGL_ERROR_REPORT = 4; - static final int ENABLE_OPENGL_ERROR_REPORT = -4; + static final int DISABLE_OPENGL_ERROR_REPORT = 4; + static final int ENABLE_OPENGL_ERROR_REPORT = -4; - static final int ENABLE_ACCURATE_TEXTURES = 5; - static final int DISABLE_ACCURATE_TEXTURES = -5; + static final int ENABLE_ACCURATE_TEXTURES = 5; + static final int DISABLE_ACCURATE_TEXTURES = -5; - static final int DISABLE_DEPTH_MASK = 6; - static final int ENABLE_DEPTH_MASK = -6; + static final int DISABLE_DEPTH_MASK = 6; + static final int ENABLE_DEPTH_MASK = -6; - static final int ENABLE_ACCURATE_2D = 7; - static final int DISABLE_ACCURATE_2D = -7; + static final int ENABLE_ACCURATE_2D = 7; + static final int DISABLE_ACCURATE_2D = -7; - static final int DISABLE_TEXTURE_CACHE = 8; - static final int ENABLE_TEXTURE_CACHE = -8; + static final int DISABLE_TEXTURE_CACHE = 8; + static final int ENABLE_TEXTURE_CACHE = -8; - static final int DISABLE_TRANSFORM_CACHE = 9; - static final int ENABLE_TRANSFORM_CACHE = -9; + static final int DISABLE_TRANSFORM_CACHE = 9; + static final int ENABLE_TRANSFORM_CACHE = -9; - static final int ENABLE_PERSPECTIVE_CORRECTED_STROKE = 10; - static final int DISABLE_PERSPECTIVE_CORRECTED_STROKE = -10; + static final int ENABLE_STROKE_PERSPECTIVE = 10; + static final int DISABLE_STROKE_PERSPECTIVE = -10; - static final int DISABLE_TEXTURE_MIPMAPS = 11; - static final int ENABLE_TEXTURE_MIPMAPS = -11; + static final int DISABLE_TEXTURE_MIPMAPS = 11; + static final int ENABLE_TEXTURE_MIPMAPS = -11; static final int HINT_COUNT = 12; diff --git a/core/src/processing/opengl/PGraphics2D.java b/core/src/processing/opengl/PGraphics2D.java index 7e1ab16ca..1be090a4c 100644 --- a/core/src/processing/opengl/PGraphics2D.java +++ b/core/src/processing/opengl/PGraphics2D.java @@ -36,7 +36,7 @@ public class PGraphics2D extends PGraphicsOpenGL { public PGraphics2D() { super(); - hints[ENABLE_PERSPECTIVE_CORRECTED_STROKE] = false; + hints[ENABLE_STROKE_PERSPECTIVE] = false; } @@ -61,7 +61,7 @@ public class PGraphics2D extends PGraphicsOpenGL { public void hint(int which) { - if (which == ENABLE_PERSPECTIVE_CORRECTED_STROKE) { + if (which == ENABLE_STROKE_PERSPECTIVE) { showWarning("2D lines cannot be perspective-corrected."); return; } diff --git a/core/src/processing/opengl/PGraphics3D.java b/core/src/processing/opengl/PGraphics3D.java index 514cfa8cb..4d356f39d 100644 --- a/core/src/processing/opengl/PGraphics3D.java +++ b/core/src/processing/opengl/PGraphics3D.java @@ -36,7 +36,7 @@ public class PGraphics3D extends PGraphicsOpenGL { public PGraphics3D() { super(); - hints[ENABLE_PERSPECTIVE_CORRECTED_STROKE] = true; + hints[ENABLE_STROKE_PERSPECTIVE] = true; } ////////////////////////////////////////////////////////////// diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 60ff4447a..d0bf0612d 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -2093,12 +2093,12 @@ public class PGraphicsOpenGL extends PGraphics { setFlushMode(FLUSH_CONTINUOUSLY); } else if (which == DISABLE_TEXTURE_CACHE) { flush(); - } else if (which == DISABLE_PERSPECTIVE_CORRECTED_STROKE) { + } else if (which == DISABLE_STROKE_PERSPECTIVE) { if (0 < tessGeo.lineVertexCount && 0 < tessGeo.lineIndexCount) { // We flush the geometry using the previous line setting. flush(); } - } else if (which == ENABLE_PERSPECTIVE_CORRECTED_STROKE) { + } else if (which == ENABLE_STROKE_PERSPECTIVE) { if (0 < tessGeo.lineVertexCount && 0 < tessGeo.lineIndexCount) { // We flush the geometry using the previous line setting. flush(); @@ -6845,7 +6845,7 @@ public class PGraphicsOpenGL extends PGraphics { float h = pgCurrent.viewport[3]; setUniformValue(viewportLoc, x, y, w, h); - if (pgCurrent.hintEnabled(ENABLE_PERSPECTIVE_CORRECTED_STROKE)) { + if (pgCurrent.hintEnabled(ENABLE_STROKE_PERSPECTIVE)) { setUniformValue(perspectiveLoc, 1); } else { setUniformValue(perspectiveLoc, 0); @@ -6962,7 +6962,7 @@ public class PGraphicsOpenGL extends PGraphics { float h = pgCurrent.viewport[3]; setUniformValue(viewportLoc, x, y, w, h); - if (pgCurrent.hintEnabled(ENABLE_PERSPECTIVE_CORRECTED_STROKE)) { + if (pgCurrent.hintEnabled(ENABLE_STROKE_PERSPECTIVE)) { setUniformValue(perspectiveLoc, 1); } else { setUniformValue(perspectiveLoc, 0);