There is a "resize" problem with JOGL in Mac OS X.
When I run the following jogl demo it works fine at first. But when I try to resize it the canvas disappears. I just see a blank jpanel in its place.
The Mac OS X version is 10.9.5 or higher
It also doesn't work on Yosemite 10.10.3
It is reproducible both with and without Java Webstart. Our standalone application has same problem.
This bug was first reported in jogl forum here:
- OSX 10.10.4
- Java 1.8.0_51 x64
- Java 1.6.0_65-b14-466.1 x32 and x64
JOGL Unit Tests:
- com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT: OK
- com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT: OK
- Manual demos.gears.Gears: OK
- JNLP Launch reproduces the issue: ERROR
- Error is reproduced if resizing very fast about a bigger amount,
e.g. 50% - for the first time!
- Error is not reproduced if first resize happen slowly about
a tiny amount. Later fast resizes work then.
Hence we do have an issue at least on latest OSX w/ latest java8
when running as WebStart - and w/ 'fast resize'.
JAWTWindow's JAWTComponentListener 'isShowing'
state is initialized while attaching it on-thread
and updated via hierarchy-changed event.
JAWTComponentListener attachment to the component
is issued at JAWTWindow's creation but on the AWT-EDT,
hence it may happen at a later time.
In this bug scenario, it happens very late,
so that the hierarchy-changed event is missed
and 'isShowing' is never set to 'true'.
Solution is to update 'isShowing' state
on the actual AWT-EDT when attaching to the component.
Also make 'isShowing' volatile.
Fixed as described in comment 2