Created attachment 788 [details]
Sample program that shows the problem.
If you remove and then re-add a GLJPanel from its parent, a small version (about 50px * 50px it appears) of the content is rendered.
Resizing the window restores the GLJPanel to its normal behavior.
Setting 'sendReshape' to true in the 'addNotify' implementation of GLJPanel fixes the issue. Not sure if that's the right fix though.
Thanks you for providing a sample program and a tip to work around this bug. Can you confirm that you use JOGL 2.3.2?
I use JOGL 2.3.2 indeed
putting this on version 2.5.0 for now
Test Bug1310: Remove and re-add a GLJPanel from its Swing parent (working)
Also tested with Sofr-HiDPI on Linux using GDK_SCALE=2
Bug 1310: Detect missing glViewport(..) on Windows before GLEventListener.reshape(..) when re-adding GLJPanel
When re-adding GLJPanel on Windows glViewport()
is not called through
Instead the following sequence is called due to sendReshape == false:
- GLDrawableHelper.display() ** missing glViewport(..) **
This bug is not visible on X11 or MacOS since the glViewport
is only set to a different user value on Windows ...
Bug 1310: Reset GLJPanel states @ dispose(..) and always reshapeImpl(..) @ addNotify(), leading to proper initialization sequence when re-adding panel.
The proper initialization sequence subsequently also leads to proper glViewport initialization,
see commit d17d807a76ba9cb940542264fcad9cf71c7ec585
No side-effects expected, just ensuring same code-path compared to initial addNotify().