From 3cf9fd3a37c79fa9b6accbaa79f84a865823284e Mon Sep 17 00:00:00 2001 From: Junology Date: Thu, 9 Jan 2025 01:35:04 +0900 Subject: [PATCH] Make PShapeOpenGL.setFill(int,int) always update tessellated vertices if any --- core/src/processing/opengl/PShapeOpenGL.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/processing/opengl/PShapeOpenGL.java b/core/src/processing/opengl/PShapeOpenGL.java index 810cbab708..e6555f8fd1 100644 --- a/core/src/processing/opengl/PShapeOpenGL.java +++ b/core/src/processing/opengl/PShapeOpenGL.java @@ -2005,12 +2005,12 @@ public void setFill(int index, int fill) { } if (image == null) { - if (root.tessUpdate) { + inGeo.colors[index] = PGL.javaToNativeARGB(fill); + if (shapeCreated && tessellated && hasPolys) { int tessIdx = firstPolyVertex + index; tessGeo.polyColors[tessIdx] = PGL.javaToNativeARGB(fill); root.setModifiedPolyColors(tessIdx, tessIdx); } else { - inGeo.colors[index] = PGL.javaToNativeARGB(fill); markForTessellation(); } } @@ -2101,12 +2101,12 @@ public void setTint(int index, int tint) { } if (image != null) { - if (root.tessUpdate) { + inGeo.colors[index] = PGL.javaToNativeARGB(tint); + if (shapeCreated && tessellated && hasPolys) { int tessIdx = firstPolyVertex + index; tessGeo.polyColors[tessIdx] = PGL.javaToNativeARGB(tint); root.setModifiedPolyColors(tessIdx, tessIdx); } else { - inGeo.colors[index] = PGL.javaToNativeARGB(tint); markForTessellation(); } }