We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am trying to create a loading bar for process that needs to complete millions of steps, but I have the problem that, when running the process, it does not allow me to draw things. Here is an example: void setup(){ size(500, 100); } void draw(){ for(int i = 0;i<500;i++)for(int k =0;k<100000;k++){ rect(0, 0, i, 20); print(i, k); } } I can see the text being printed, but the rectangle does not appear.
Answers
The screen doesn't update until the end of draw() is reached. The best thing to do would be to spawn your worker loop in a new thread:
If this feels like dark magic, that's because it is!