We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey, i`ve this simple code:
PWindow w;
Radar r;
void settings() {
size(500, 500, P3D);
}
void setup() {
w = new PWindow();
r = new Radar();
}
void draw() {
translate(width/2, height/2);
box(200);
}
class Radar{
Radar(){
}
void display(){
stroke(255);
ellipse(width/2, height/2, 100, 100);
}
}
class PWindow extends PApplet {
PWindow() {
super();
PApplet.runSketch(new String[] {this.getClass().getSimpleName()}, this);
}
void settings() {
size(500, 500, P2D);
}
void setup(){
background(0);
}
void draw(){
r.display();
}
}
but it doesn't work (crash). im really don't know how use a class inside a extra applet. any suggestion?
Answers
We can't have more than 1 PApplet using a OpenGL renderer at the same sketch! [-X