deal with windows flickering during resize (fixes #386)

This commit is contained in:
Ben Fry
2022-01-30 09:08:28 -05:00
parent b8652812c3
commit a32eca75cf
2 changed files with 13 additions and 3 deletions

View File

@@ -798,6 +798,9 @@ public class PSurfaceJOGL implements PSurface {
if (display.getEDTUtil().isCurrentThreadEDT()) {
// For some unknown reason, a few frames of the animator run on
// the EDT. For those, we just skip this draw call to avoid badness.
// See below for explanation of this two line hack.
pgl.beginRender();
pgl.endRender(sketch.sketchWindowColor());
return;
}