mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
kind parameter in shader(shader, kind) overrides shader type specified
by #define or autodetection using uniforms.
This commit is contained in:
@@ -6680,9 +6680,13 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
|
||||
|
||||
@Override
|
||||
// TODO: deprecate this method, the kind arguments is not used anymore
|
||||
public void shader(PShader shader, int kind) {
|
||||
shader(shader);
|
||||
flush(); // Flushing geometry drawn with a different shader.
|
||||
|
||||
if (kind == TRIANGLES) polyShader = shader;
|
||||
else if (kind == LINES) lineShader = shader;
|
||||
else if (kind == POINTS) pointShader = shader;
|
||||
else PGraphics.showWarning(UNKNOWN_SHADER_KIND_ERROR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user