From f3491cbc2c5ddc6870d69d9a06da3ac96c3827b1 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Mon, 3 Jun 2013 11:23:04 -0400 Subject: [PATCH] address regression reported in #1846 --- core/src/processing/opengl/PShapeOpenGL.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/processing/opengl/PShapeOpenGL.java b/core/src/processing/opengl/PShapeOpenGL.java index 6a525c11d..e194d0eb3 100644 --- a/core/src/processing/opengl/PShapeOpenGL.java +++ b/core/src/processing/opengl/PShapeOpenGL.java @@ -1446,7 +1446,14 @@ public class PShapeOpenGL extends PShape { @Override public int getVertexCount() { - return family == GROUP ? 0 : inGeo.vertexCount; + if (family == GROUP) return 0; // Group shapes don't have vertices + else { + if (family == PRIMITIVE) { + // the input geometry of primitive shapes is built during tessellation + updateTessellation(); + } + return inGeo.vertexCount; + } }