-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PShape setFill(indx, color) not working in Processing 4 #900
Comments
You can update vertex colors in "Tessellation update mode" (though I don't know what it is supposed to mean): void mousePressed() {
for (int i = 0; i < t.getVertexCount(); i++) {
((PShapeOpenGL) t).beginTessellation(POINTS);
t.setFill(i, color(random(255), random(255), random(255)));
((PShapeOpenGL) t).endTessellation();
}
} It is also fixed by changing the core as follows:
Since I don't know what "Tessellation update mode" is for, I am hesitating to make PR for this fix. |
Thank you so much for this. It works! |
I didn't know there was a "Tessellation update mode", but I do understand what tessellation means for |
Most appropriate sub-area of Processing 4?
OpenGL
Processing version
4.3
Operating system
MacOSX
Steps to reproduce this
"1. The source code below demonstrates the problem. The PShape should change color when the mouse is clicked.
The source code runs correctly in versions 2.2.1 (macos) and 3.5.4 (reported by another forum member running Windows) indicating a runtime code change prior to version 4.
There is a similar report from a year ago: PShape.setFill() no longer works #677"
We would like to change the vertex colors of the original PShape object without having to create a second object.
snippet
Additional context
No response
The text was updated successfully, but these errors were encountered: