The example for GetImage illustrates nicely the problem with the current SyphonClient implementation
Add a call to background(0) at the start of draw() and watch the output flicker....
It should properly do something like this
public void draw() {
Always background(0)
background(0);
active() should be added to expose JSyphonClient's isValid
if (client.active()) {
available() should be renamed to something like newFrameAvailable()
if (client.newFrameAvailable()) {
// The first time getImage() is called with
// a null argument, it will initialize the PImage
// object with the correct size.
img = client.getImage(img); // load the pixels array with the updated image info (slow)
// img = client.getImage(img, false); // does not load the pixels array (faster)
}
If the client is active, draw every pass regardless of whether the frame is new
The example for GetImage illustrates nicely the problem with the current SyphonClient implementation
Add a call to
background(0)
at the start ofdraw()
and watch the output flicker....It should properly do something like this
Always
background(0)
active() should be added to expose JSyphonClient's isValid
available()
should be renamed to something like newFrameAvailable()If the client is active, draw every pass regardless of whether the frame is new