Skip to content

Commit f350607

Browse files
committed
gl sync
1 parent aaeba7c commit f350607

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/processing/opengl/PGraphicsOpenGL.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6680,9 +6680,13 @@ public void shader(PShader shader) {
66806680

66816681

66826682
@Override
6683-
// TODO: deprecate this method, the kind arguments is not used anymore
66846683
public void shader(PShader shader, int kind) {
6685-
shader(shader);
6684+
flush(); // Flushing geometry drawn with a different shader.
6685+
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);
66866690
}
66876691

66886692

0 commit comments

Comments
 (0)