Mac OSX GLJPanel Performance - integrating Swing and JOGL
Posted by billyork23 on Jul 28, 2010; 4:55pm
URL: https://forum.jogamp.org/Mac-OSX-GLJPanel-Performance-integrating-Swing-and-JOGL-tp1002442.html
We have a complicated desktop app that integrates JOGL and Swing in the same window. On Windows and Linux we do this by creating AWT Panels, placing them in front of the JOGL GLCanvas, and placing Swing components in the AWT Panel. This gives us all the benefits of hardware accelerated OpenGL without the cost or moving away from our Swing UI elements.
The current implementation of Swing and JOGL on the Mac does not allow us to use this same trick.
Our goal is to get maximum OpenGL performance without rewriting all the Swing based portions of our App.
At this point I see three reasonable paths forward and would like input from others in JOGL arena.
1) Debug why GLJPanel performance is so slow. Chatter on the forums suggests this is a known issue and I've not seen much discussion about how to get around it. Note that GLPbuffer performance is equally slow.
2) Use a GLCanvas but clip out rectangles using native OS API calls. We've done this in the past but it requires a bit of native code that we'd rather not maintain.
3) Draw the Swing controls into a bitmap and blit the bitmap onto a GLCanvas. This may create excess overhead when we have many many swing controls.
If you have ideas on this and which path is the best given the direction of JOGL, please let me know.
Bill