Skip to content

Commit d1bf6f8

Browse files
committed
opened api to accept PImage as input render source
1 parent ea86da3 commit d1bf6f8

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/main/java/ch/bildspur/postfx/PostFXSupervisor.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package ch.bildspur.postfx;
22

33
import ch.bildspur.postfx.pass.Pass;
4-
import processing.core.PApplet;
5-
import processing.core.PConstants;
6-
import processing.core.PGraphics;
7-
import processing.core.PMatrix3D;
4+
import processing.core.*;
85

96
import java.nio.file.Path;
107

@@ -108,7 +105,7 @@ public void render() {
108105
* @param graphics Texture used as input.
109106
*/
110107
@Override
111-
public void render(PGraphics graphics) {
108+
public void render(PImage graphics) {
112109
PGraphics pass = getNextPass();
113110
clearPass(pass);
114111

src/main/java/ch/bildspur/postfx/Supervisor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import ch.bildspur.postfx.pass.Pass;
44
import processing.core.PGraphics;
5+
import processing.core.PImage;
56

67
/**
78
* Handles the pass buffer and render technique.
@@ -28,7 +29,7 @@ public interface Supervisor {
2829
*
2930
* @param graphics Texture used as input.
3031
*/
31-
void render(PGraphics graphics);
32+
void render(PImage graphics);
3233

3334
/**
3435
* Apply pass to texture.

src/main/java/ch/bildspur/postfx/builder/PostFX.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import ch.bildspur.postfx.pass.Pass;
55
import processing.core.PApplet;
66
import processing.core.PGraphics;
7+
import processing.core.PImage;
78

89
/**
910
* Basic PostFX api with builder pattern.
@@ -41,7 +42,7 @@ public PostFX(PApplet sketch, int width, int height) {
4142
* @param graphics Texture used to render.
4243
* @return PostFXBuilder pattern object.
4344
*/
44-
public PostFXBuilder render(PGraphics graphics) {
45+
public PostFXBuilder render(PImage graphics) {
4546
supervisor.render(graphics);
4647
return builder;
4748
}

0 commit comments

Comments
 (0)