Hi! Ive been trying to make my programm be minimized till it is done loading.
My code doesn’t work however and I haven’t seen a topic asking this.
void setup() {
surface.setVisible(false);
size(960, 540, P2D);
delay(1000);
}
void draw() {
surface.setVisible(true);
background(0);
}
Thanks for any help!
2 Likes
Chrisir
2
Maybe size() as first command
Or use the function settings, check reference
2 Likes
quark
3
It doesn’t work with P2D (OpenGL) but this works (Java AWT)
void setup() {
size(960, 540);
surface.setVisible(false);
delay(5000);
}
void draw() {
surface.setVisible(true);
background(0);
}
3 Likes
glv
4
Hello @Noodlybanan,
Try this:
void setup()
{
size(400, 400, P2D); // Works with thread("visible")
//size(400, 400); // Works!
surface.setVisible(false);
thread("visible");
}
void draw()
{
background(255, 255, 0);
println(frameCount);
}
void visible()
{
delay(5000);
surface.setVisible(true);
surface.setLocation(100, 100);
}
Reference here gave me some insight:
surface.setVisible() on different renderers - Processing 2.x and 3.x Forum
:)
1 Like