More detailed error message when vertex index goes beyond 32767.

This commit is contained in:
codeanticode
2012-04-21 21:48:29 +00:00
parent 4c9bd15076
commit ce8cd2f652
2 changed files with 2 additions and 9 deletions
@@ -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;
@@ -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();
}
}