Inicio › Foros › Técnica › Mapping › Como Proyectar Aplicacion ? › Re: Como Proyectar Aplicacion ?
Processing (server) to Quartz (client)
http://code.google.com/p/syphon-impleme … loads/list
void setup() {
size(400,400, P3D);
server = new SyphonServer(this, "Processing Frame Server");
…
}
void draw() {
…
server.sendImage(img);
}
The argument for sendImage() can be either a PImage or a P3D PGraphics object. Also, note that the main renderer for the sketch also needs to be P3D, otherwise the library won’t work.
In order to receive frames, we need to setup a client in a similar way:
public void setup() {
size(480, 340, P3D);
client = new SyphonClient(this, "Simple Server");
…
}
void draw() {
if (client.available()) {
canvas = client.getGraphics(pg);
…
}
}