PShader

Data / Composite

Description

Datatype for GLSL shaders. Load with loadShader() and apply with shader().

Syntax

PShader* s = loadShader("frag.glsl")

Parameters

None

Returns

PShader

Methods

set(std::string name, float v)Set a uniform float
set(std::string name, int v)Set a uniform int
set(std::string name, float x, float y)Set a uniform vec2
set(std::string name, float x, float y, float z)Set a uniform vec3
bind()Activate the shader
unbind()Deactivate the shader

Related

Under the Hood

Implementation in Processing.h / Processing.cpp:

Loading...