public class PostFX
extends java.lang.Object
Constructor and Description |
---|
PostFX(processing.core.PApplet sketch)
Create a new PostFX context.
|
PostFX(processing.core.PApplet sketch,
int width,
int height) |
Modifier and Type | Method and Description |
---|---|
void |
clearPassCache()
Clears all cached passes.
|
<T extends Pass> |
preload(java.lang.Class<T> type)
Preload a specific path to avoid delay because of shader compiling.
|
PostFXBuilder |
render()
Start a rendering the screen framebuffer.
|
PostFXBuilder |
render(processing.core.PGraphics graphics)
Start rendering a texture.
|
void |
setResolution(int width,
int height)
Re-initialise the framebuffer with a different size.
|
void |
setResolution(processing.core.PApplet sketch)
Re-initialise the framebuffer with a different size.
|
void |
setResolution(processing.core.PGraphics texture)
Re-initialise the framebuffer with a different size.
|
public PostFX(processing.core.PApplet sketch)
sketch
- Processing context.public PostFX(processing.core.PApplet sketch, int width, int height)
sketch
- Processing context.width
- Width of the pass buffer.height
- Height of the pass buffer.public PostFXBuilder render(processing.core.PGraphics graphics)
graphics
- Texture used to render.public PostFXBuilder render()
public void setResolution(processing.core.PApplet sketch)
sketch
- Sketch with new size.public void setResolution(processing.core.PGraphics texture)
texture
- Texture object with new size.public void setResolution(int width, int height)
width
- Width of the new framebuffer.height
- Height of the new framebuffer.public <T extends Pass> T preload(java.lang.Class<T> type)
T
- Type of the pass to preload.type
- Type of the pass to preload.public void clearPassCache()