We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaeba7c commit f350607Copy full SHA for f350607
core/src/processing/opengl/PGraphicsOpenGL.java
@@ -6680,9 +6680,13 @@ public void shader(PShader shader) {
6680
6681
6682
@Override
6683
- // TODO: deprecate this method, the kind arguments is not used anymore
6684
public void shader(PShader shader, int kind) {
6685
- shader(shader);
+ flush(); // Flushing geometry drawn with a different shader.
+
6686
+ if (kind == TRIANGLES) polyShader = shader;
6687
+ else if (kind == LINES) lineShader = shader;
6688
+ else if (kind == POINTS) pointShader = shader;
6689
+ else PGraphics.showWarning(UNKNOWN_SHADER_KIND_ERROR);
6690
}
6691
6692
0 commit comments