Skip to content

Commit 3cf9fd3

Browse files
committed
Make PShapeOpenGL.setFill(int,int) always update tessellated vertices if any
1 parent 87fb351 commit 3cf9fd3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/processing/opengl/PShapeOpenGL.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,12 +2005,12 @@ public void setFill(int index, int fill) {
20052005
}
20062006

20072007
if (image == null) {
2008-
if (root.tessUpdate) {
2008+
inGeo.colors[index] = PGL.javaToNativeARGB(fill);
2009+
if (shapeCreated && tessellated && hasPolys) {
20092010
int tessIdx = firstPolyVertex + index;
20102011
tessGeo.polyColors[tessIdx] = PGL.javaToNativeARGB(fill);
20112012
root.setModifiedPolyColors(tessIdx, tessIdx);
20122013
} else {
2013-
inGeo.colors[index] = PGL.javaToNativeARGB(fill);
20142014
markForTessellation();
20152015
}
20162016
}
@@ -2101,12 +2101,12 @@ public void setTint(int index, int tint) {
21012101
}
21022102

21032103
if (image != null) {
2104-
if (root.tessUpdate) {
2104+
inGeo.colors[index] = PGL.javaToNativeARGB(tint);
2105+
if (shapeCreated && tessellated && hasPolys) {
21052106
int tessIdx = firstPolyVertex + index;
21062107
tessGeo.polyColors[tessIdx] = PGL.javaToNativeARGB(tint);
21072108
root.setModifiedPolyColors(tessIdx, tessIdx);
21082109
} else {
2109-
inGeo.colors[index] = PGL.javaToNativeARGB(tint);
21102110
markForTessellation();
21112111
}
21122112
}

0 commit comments

Comments
 (0)