I’ve had pretty good luck with GLCanvases, but I need to use GLJPanels in a couple spots and I’m having trouble. After starting the application, it appears that all AWT events stop occuring: my top-level JFrame cannot get focus, no AWT event listeners are called, and there are no calls to my GLEventListener. My top-level JFrame is created and paint() is getting called at some point (I changed the background color so it would be obvious.)
My best guess is that there’s a deadlock or an unreported thread death (probably not an infinite loop, as I do not see elevated CPU usage) somewhere in the GLJPanel’s paint() code.
If I use a GLCanvas instead, I can render a few frames, but then it also appears that AWT events stop occuring.
I’m running x86 Fedora Core 5, java 1.5.0_06-b05. I’ve tried JSR231 dated 2/17 and the most recent nightly build with the same results. I have a nvidia Ti4200 using the proprietary nvidia driver 8178. Other OpenGL apps seem to work fine and glxinfo reports that direct rendering is enabled.
I will check my x86_64 machine when I get home-- my GLCanvas code worked fine on that machine last time I checked (but I don’t know whether I had GLJPanel problems.)
Any ideas?
-Ed
PS: Is there a graceful way to enable anti-aliasing if (and only if) it is supported? On my lesser x86 machine, I have to remember to disable anti-aliasing or a GLException is thrown complaining about XVisualInfos.