Same Capture stream in two PApplet frames

edited November 2016 in Library Questions

Hello, I'd like to ask for your help.

I'm working on a Processing sketch running two frames (via runSketch() ). In the main PApplet I'm showing and filtering, with a GLSL shader, a Capture object. I'd like to see the same Capture stream in the second PApplet, unfiltered, using it as a "system monitor", and launch PApplet 1 on projector and PApplet 2 on Macbook display.

As fai as I can go, I'm referencing the Capture obj from the main PApplet in the second. if I call image(Capture,0,0) I'm just able to see the first captured frame from the webcam. To actually see the frames updating, I gotta call image(Capture.copy(),0,0); but also if the PApplet framerate doesn't drop, I can see a frame drop in the two sketches.

This doesn't happen if I call two times image(Capture,0,0) in the main PApplet. Framerate of PApplet and Capture stays up.

Any hints?

Thank you.

Sign In or Register to comment.