Hi all!
I’m working on a multilayer vjing software based on Processing and I have successfully integrated Syphon to send the entire video mix to MadMapper and such.
Now I’m trying to create one Syphon Server per Layer, but seems that, when I create a new Server, even if every Layer publish frames only on his own Server, only the last created Server send frames and not only of the Layer that is publishing frames on it, but the entire video mix.
Every Layer has the method “sendImage()” called after the “draw()”, “g” is the PGraphics on witch every Layer draws, then a collector draws every Layer on the main canvas, here the code used by Layer to send his graphic through Syphon:
public void sendImage() {
Texture tex = ((PGraphicsOpenGL) g).getTexture();
if (server == null) {
server = new JSyphonServer();
server.initWithName(serverName);
}
if (tex != null) {
server.publishFrameTexture(tex.glName, tex.glTarget, 0, 0, tex.glWidth, tex.glHeight, tex.glWidth, tex.glHeight, false);
}
}
Any advice?
Thank you in advance! 🙂