From 6959a34bd88b6bdb33623daf9dceaf4159bd8820 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Thu, 15 Dec 2011 18:29:14 +0000 Subject: [PATCH] Disabled use of path lines --- .../processing/opengl/PGraphicsOpenGL.java | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java index 14a81f79a..a5cd25e74 100644 --- a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -8425,17 +8425,28 @@ public class PGraphicsOpenGL extends PGraphics { addLine(i0, i1, vcount, icount); vcount += 4; icount += 6; } } else { - GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO); + tessGeo.firstLineIndex = tessGeo.fillIndexCount; + tessGeo.addFillVertices(inGeo.getNumLineVertices()); + tessGeo.addFillIndices(inGeo.getNumLineIndices()); + tessGeo.lastLineIndex = tessGeo.fillIndexCount - 1; + int vcount = tessGeo.firstFillVertex; + int icount = tessGeo.firstFillIndex; for (int ln = 0; ln < lineCount; ln++) { int i0 = first + 2 * ln + 0; - int i1 = first + 2 * ln + 1; - path.moveTo(inGeo.vertices[3 * i0 + 0], inGeo.vertices[3 * i0 + 1]); - path.lineTo(inGeo.vertices[3 * i1 + 0], inGeo.vertices[3 * i1 + 1]); - path.closePath(); - } - tessGeo.firstLineIndex = tessGeo.fillIndexCount; - tessellatePath(path); - tessGeo.lastLineIndex = tessGeo.fillIndexCount - 1; + int i1 = first + 2 * ln + 1; + addLineToFill(i0, i1, vcount, icount); vcount += 4; icount += 6; + } +// GeneralPath path = new GeneralPath(GeneralPath.WIND_NON_ZERO); +// for (int ln = 0; ln < lineCount; ln++) { +// int i0 = first + 2 * ln + 0; +// int i1 = first + 2 * ln + 1; +// path.moveTo(inGeo.vertices[3 * i0 + 0], inGeo.vertices[3 * i0 + 1]); +// path.lineTo(inGeo.vertices[3 * i1 + 0], inGeo.vertices[3 * i1 + 1]); +// path.closePath(); +// } +// tessGeo.firstLineIndex = tessGeo.fillIndexCount; +// tessellatePath(path); +// tessGeo.lastLineIndex = tessGeo.fillIndexCount - 1; } } }