public class PostFXSupervisor extends java.lang.Object implements Supervisor
Constructor and Description |
---|
PostFXSupervisor(processing.core.PApplet sketch)
Create a new ping-pong pass buffer.
|
PostFXSupervisor(processing.core.PApplet sketch,
int width,
int height)
Create a new ping-pong pass buffer.
|
Modifier and Type | Method and Description |
---|---|
void |
clearPass(processing.core.PGraphics pass)
Clear a pass (black with alpha).
|
void |
compose()
Compose and finalize rendering onto sketch texture.
|
void |
compose(processing.core.PGraphics graphics)
Compose and finalize rendering.
|
processing.core.PGraphics |
getCurrentPass()
Get current pass of the pass buffer.
|
processing.core.PGraphics |
getNextPass()
Get next pass of the pass buffer.
|
int[] |
getResolution()
Returns pass buffer resolution.
|
void |
pass(Pass pass)
Apply pass to texture.
|
void |
render()
Start a new multi-pass rendering with the screen framebuffer.
|
void |
render(processing.core.PGraphics graphics)
Start a new multi-pass rendering.
|
void |
setResolution(int width,
int height)
Set new resolution and re-init buffer.
|
public PostFXSupervisor(processing.core.PApplet sketch)
sketch
- Processing context. Sketch size will be used.public PostFXSupervisor(processing.core.PApplet sketch, int width, int height)
sketch
- Processing context.width
- Width of the pass buffer.height
- Height of the pass buffer.public void setResolution(int width, int height)
setResolution
in interface Supervisor
width
- New width of the pass buffer.height
- New height of the pass buffer.public int[] getResolution()
getResolution
in interface Supervisor
public void render()
public void render(processing.core.PGraphics graphics)
render
in interface Supervisor
graphics
- Texture used as input.public void pass(Pass pass)
pass
in interface Supervisor
pass
- Pass to apply.public void compose()
public void compose(processing.core.PGraphics graphics)
compose
in interface Supervisor
graphics
- Texture to render onto.public processing.core.PGraphics getNextPass()
getNextPass
in interface Supervisor
public processing.core.PGraphics getCurrentPass()
getCurrentPass
in interface Supervisor
public void clearPass(processing.core.PGraphics pass)
clearPass
in interface Supervisor
pass
- Pass to clear.