Hi,
in an overview my program does this:
canvas.display(); // invoke a render
save_and_process_results(); // process based on what was drawn
canvas.display(); // another render...
... more processing
I’ve just realized that the weird resuts I’m getting must be due to the fact that GLcanvas.display()
probably just schedules a display() call and returns immediately. So the save_and_process_results()
starts before the image is finished displaying, and sometimes even before it starts displaying.
Is there an easy way to call display() synchronously, or to know when it is done
so it is safe to process the results?
I suppose the two threads could communicate by setting a flag…