"bluescreen" during draw() ?
in
Programming Questions
•
3 years ago
I've recently started using multiple threads (-so it is likely I'm making mistakes there-) when I came accross the following problem:
My main routine (in draw()) clears the background and draws on it, as usual. Some other threads "prepare" things to be drawn, and they are drawn in a PGraphics buffer first (using both JAVA2D and P2D). Only when they are finished, the objects are used in the main thread.
That works nicely. However, every so often in a not quite regular way, my main drawing routine seems to "flicker" by displaying what seems to be a blue background for a very short time, while turning a grey rectangle red.
Now, I do not use blue at ANY time in my sketch, so where does it come from? Ideas?
Worthwhile mentioning: I don't seem to have the problem without using mutliple threads, and those threads do prepare graphics.
1