PrOGL
processing open-gl interface
|
Shader object organizes a list of uniforms and a compiled PShader. More...
Package Functions | |
Shader (String path, int w, int h) | |
Shader Constructor without Uniforms. | |
Shader (String path, int w, int h, Uniform u) | |
Shader Constructor with Uniform. | |
Shader (String path, int w, int h, ArrayList< Uniform > u) | |
Shader Constructor with Uniforms. | |
void | make_default_uniforms () |
this creates three common uniforms as defaults. | |
void | add_uniforms (ArrayList< Uniform > custom_uniforms) |
add a list of custom defined uniforms. | |
void | add_uniform (Uniform custom_uniform) |
add a single uniform. | |
void | set_uniforms () |
set uniforms in shader. | |
void | update_uniforms () |
update uniforms with an update function. | |
void | print () |
print function for debugging. | |
Package Attributes | |
PShader | program |
OpenGL program binding. | |
shader_type | type |
Shader type (vertex or fragment) | |
ArrayList< Uniform > | uniforms = new ArrayList<Uniform>() |
Uniform data. | |
int | w |
< width | |
int | h |
< height | |
Shader object organizes a list of uniforms and a compiled PShader.
Definition at line 21 of file Shader.pde.
|
package |
Shader Constructor without Uniforms.
loads the shader code and sets default uniforms.
path | relative path to shader text file |
w | width of shader |
h | height of shader |
Definition at line 36 of file Shader.pde.
References h, make_default_uniforms(), program, set_uniforms(), and w.
|
package |
Shader Constructor with Uniform.
loads the shader code and sets default and one user supplied uniforms.
path | relative path to shader text file |
w | width of shader |
h | height of shader |
u | Uniform object to add to list |
Definition at line 52 of file Shader.pde.
References add_uniform(), h, make_default_uniforms(), program, set_uniforms(), and w.
|
package |
Shader Constructor with Uniforms.
loads the shader code and sets default and additional uniforms.
path | relative path to shader text file |
w | width of shader |
h | height of shader |
u | an ArrayList of Uniform objects to add to the shader |
Definition at line 69 of file Shader.pde.
References add_uniforms(), h, make_default_uniforms(), program, set_uniforms(), and w.
|
package |
|
package |
add a list of custom defined uniforms.
Definition at line 121 of file Shader.pde.
References uniforms.
|
package |
this creates three common uniforms as defaults.
they are time (updating float), resolution (vec2), and mouse (vec3).
Definition at line 82 of file Shader.pde.
References uniform_type.FLOAT, h, uniforms, uniform_type.VEC2, uniform_type.VEC3, and w.
|
package |
|
package |
set uniforms in shader.
Definition at line 131 of file Shader.pde.
|
package |
update uniforms with an update function.
Definition at line 138 of file Shader.pde.
|
package |
< height
Definition at line 26 of file Shader.pde.
|
package |
OpenGL program binding.
Definition at line 22 of file Shader.pde.
|
package |
Shader type (vertex or fragment)
Definition at line 23 of file Shader.pde.
Uniform data.
Definition at line 24 of file Shader.pde.
|
package |
< width
Definition at line 25 of file Shader.pde.