We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi to all!
i use processing as my principal instrument to do visual live set, and i've the necessity to clone the main window to another to control what is rendering in that moment!
for now i'm using this code:
class PWindow extends PApplet {
PWindow() {
super();
PApplet.runSketch(new String[] {this.getClass().getSimpleName()}, this);
}
void settings() {
size(500, 200);
}
void setup() {
background(150);
}
void draw() {
//here i want to clone the main window
}
void mousePressed() {
println("mousePressed in secondary window");
}
}
PWindow win;
public void settings() {
size(320, 240);
}
void setup() {
win = new PWindow();
}
void draw() {
background(255, 0, 0);
fill(255);
rect(10, 10, frameCount, 10);
}
void mousePressed() {
println("mousePressed in primary window");
}
is possible do what i ask starting with this?
thank to everyone!!
Answers
i try to use a PGraphi but it not clone the main window, any suggestion?
solved, if someone is interested, here the code:
i noticed that if i use P2D, it doesn't work!! and it give me this warning:
You are trying to draw outside OpenGL's animation thread. Place all drawing commands in the draw() function, or inside your own functions as long as they are called from draw(), but not in event handling functions such as keyPressed() or mousePressed(). OpenGL error 1282 at top endDraw(): invalid operation
can anyone tell me if there is a solution for this?
Please note that there’s a new forum
thank you! i post it into new forum! )
;-)