Correct logic of begin/end contours in PShape. Fixes issue #1417

This commit is contained in:
codeanticode
2012-11-27 02:40:02 +00:00
parent f735a976d6
commit 97dd0b0f1b

View File

@@ -350,6 +350,10 @@ public class PShapeOpenGL extends PShape {
normalMode = NORMAL_MODE_AUTO;
// To make sure that the first vertex is marked as a break.
// Same behavior as in the immediate mode.
breakShape = true;
if (family == GROUP) {
// GROUP shapes are always marked as ended.
shapeEnded = true;
@@ -895,6 +899,7 @@ public class PShapeOpenGL extends PShape {
return;
}
openContour = true;
breakShape = true;
}
@@ -910,7 +915,6 @@ public class PShapeOpenGL extends PShape {
return;
}
openContour = false;
breakShape = true;
}