Skip to content

Commit a32eca7

Browse files
committed
deal with windows flickering during resize (fixes #386)
1 parent b865281 commit a32eca7

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

core/src/processing/opengl/PSurfaceJOGL.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ public void display(GLAutoDrawable drawable) {
798798
if (display.getEDTUtil().isCurrentThreadEDT()) {
799799
// For some unknown reason, a few frames of the animator run on
800800
// the EDT. For those, we just skip this draw call to avoid badness.
801+
// See below for explanation of this two line hack.
802+
pgl.beginRender();
803+
pgl.endRender(sketch.sketchWindowColor());
801804
return;
802805
}
803806

core/todo.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ X breaks on aarch64
66
X https://github.com/processing/processing4/issues/372
77
_ rename jAppleMenuBar, make part of build process
88

9+
OpenGL resize and NPE sadness
10+
X why does GL flash red when resizing?
11+
X this may be because of gaps between EDT and updates
12+
X fixing the surface.setSize() issue may fix it
13+
X https://github.com/processing/processing4/issues/386
14+
15+
916
_ CODED is inconsistent between the default renderer and P2D/P3D
1017
_ includes recommendations how to fix
1118
_ https://github.com/processing/processing4/issues/376
@@ -18,6 +25,9 @@ _ https://github.com/processing/processing4/issues/128
1825
_ https://forum.jogamp.org/JOGL-for-Mac-ARM-Silicon-td4040887.html
1926
_ https://github.com/jzy3d/jogl/blob/feature/macosx-arm64/HOW-TO-ADD-ARM64-TO-2.4.md
2027

28+
_ Sort out EDT issues inside OpenGL
29+
_ https://github.com/processing/processing4/issues/385
30+
2131
_ concurrent StringDict et al
2232
_ why no concurrent TreemMap? https://stackoverflow.com/a/17656453
2333
_ https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentSkipListMap.html
@@ -42,9 +52,6 @@ _ same goes for window resize events: queue them for when it's safe
4252
_ also probably need to be extending the display with the background color
4353
_ so that it's not neither stretching the viewport temporarily
4454
_ or leaving a gap at the edge of the window
45-
_ why does GL flash red when resizing?
46-
_ this may be because of gaps between EDT and updates
47-
_ fixing the surface.setSize() issue may fix it
4855

4956
_ fullScreen() not working on a second display with P2D or P3D
5057
_ https://github.com/processing/processing4/issues/352

0 commit comments

Comments
 (0)