public class ShaderReloader
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
filter(java.lang.String fragPath)
Re-compiles the shader if needed and then applies it as a processing filter() on the main canvas.
|
static void |
filter(java.lang.String fragPath,
processing.core.PGraphics pg)
Re-compiles the shader if needed and then applies it as a processing filter() on the parameter canvas.
|
static void |
filter(java.lang.String fragPath,
java.lang.String vertPath,
processing.core.PGraphics pg)
Re-compiles the shader if needed and then applies it as a processing filter() on the parameter canvas.
|
static processing.opengl.PShader |
getShader(java.lang.String fragPath)
Gets the current snapshot of a vertex + fragment shader for uniform setting purposes.
|
static processing.opengl.PShader |
getShader(java.lang.String fragPath,
java.lang.String vertPath)
Gets the current snapshot of a vertex + fragment shader for uniform setting purposes.
|
static void |
setApplet(processing.core.PApplet applet)
Sets the PApplet reference for the ShaderReloader to use when compiling a shader.
|
static void |
shader(java.lang.String fragPath)
Re-compiles the shader if needed and then applies it as a processing shader() on the main canvas.
|
static void |
shader(java.lang.String fragPath,
processing.core.PGraphics pg)
Re-compiles the shader if needed and then applies it as a processing shader() on the parameter canvas.
|
static void |
shader(java.lang.String fragPath,
java.lang.String vertPath)
Re-compiles the shader if needed and then applies it as a processing shader() on the main canvas.
|
static void |
shader(java.lang.String fragPath,
java.lang.String vertPath,
processing.core.PGraphics pg)
Re-compiles the shader if needed and then applies it as a processing shader() on the parameter canvas.
|
public static void setApplet(processing.core.PApplet applet)
applet
- the PApplet instance to usepublic static processing.opengl.PShader getShader(java.lang.String fragPath)
fragPath
- path to the shader, either absolute or relative from the data folderpublic static processing.opengl.PShader getShader(java.lang.String fragPath, java.lang.String vertPath)
fragPath
- path to the fragment shader, either absolute or relative from the data foldervertPath
- path to the vertex shader, either absolute or relative from the data folderpublic static void filter(java.lang.String fragPath)
fragPath
- path to fragment shaderpublic static void filter(java.lang.String fragPath, processing.core.PGraphics pg)
fragPath
- path to fragment shaderpg
- canvas to apply the filter onpublic static void filter(java.lang.String fragPath, java.lang.String vertPath, processing.core.PGraphics pg)
fragPath
- path to fragment shadervertPath
- path to fragment shaderpg
- canvas to apply the filter onpublic static void shader(java.lang.String fragPath)
fragPath
- path to fragment shaderpublic static void shader(java.lang.String fragPath, java.lang.String vertPath)
fragPath
- path to fragment shadervertPath
- path to vertex shaderpublic static void shader(java.lang.String fragPath, processing.core.PGraphics pg)
fragPath
- path to fragment shaderpg
- canvas to apply the shader onpublic static void shader(java.lang.String fragPath, java.lang.String vertPath, processing.core.PGraphics pg)
fragPath
- path to fragment shadervertPath
- path to fragment shaderpg
- canvas to apply the shader on