From ce8cd2f65229d50e05c32510ac748da1a16d43b3 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Sat, 21 Apr 2012 21:48:29 +0000 Subject: [PATCH] More detailed error message when vertex index goes beyond 32767. --- java/libraries/opengl/src/processing/opengl/PGL.java | 3 ++- .../opengl/src/processing/opengl/PGraphicsOpenGL.java | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/java/libraries/opengl/src/processing/opengl/PGL.java b/java/libraries/opengl/src/processing/opengl/PGL.java index 1a92751a0..78495eebe 100644 --- a/java/libraries/opengl/src/processing/opengl/PGL.java +++ b/java/libraries/opengl/src/processing/opengl/PGL.java @@ -1245,7 +1245,8 @@ public class PGL { // http://stackoverflow.com/questions/4331021/java-opengl-gldrawelements-with-32767-vertices //return 32767 < intIdx ? (short)(intIdx - 65536) : (short)intIdx; if (32767 < intIdx) { - PGraphics.showWarning("P3D: Vertex index is greater than 32767"); + PGraphics.showWarning("P3D: More than 32767 vertices in a single shape, not all will be drawn.\n" + + "Consider splitting your large shape into multiple smaller shapes."); return 32767; } else { return (short)intIdx; diff --git a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java index cc3b65327..1cef09264 100644 --- a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -2060,10 +2060,6 @@ public class PGraphicsOpenGL extends PGraphics { if (flushMode == FLUSH_CONTINUOUSLY || (flushMode == FLUSH_WHEN_FULL && tessGeo.isFull())) { - if (flushMode == FLUSH_WHEN_FULL && tessGeo.isOverflow()) { - PGraphics.showWarning("P3D: tessellated arrays are overflowing"); - } - flush(); } } @@ -2091,10 +2087,6 @@ public class PGraphicsOpenGL extends PGraphics { if (flushMode == FLUSH_CONTINUOUSLY || (flushMode == FLUSH_WHEN_FULL && tessGeo.isFull())) { - if (flushMode == FLUSH_WHEN_FULL && tessGeo.isOverflow()) { - PGraphics.showWarning("P3D: tessellated arrays are overflowing"); - } - flush(); } }