mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
More detailed error message when vertex index goes beyond 32767.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user