Re: OSX Lion issues (PBuffers)
Posted by Moa on Jul 31, 2012; 11:49pm
URL: https://forum.jogamp.org/OSX-Lion-issues-PBuffers-tp4021385p4025716.html
Thanks for the tips guys.
I too am using a GLCanvas and get the same exception as Lucasz. I am also using multisampling, but this does not help in my case.
My code used to work correctly on OS X 10.7.4 (Lion) but has broken once moving to OS X 10.8 (Mountain Lion). My JoGL code still works on Windows and Linux.
Trying the GLJPanel suggestion this doesn't work for me either. I get messages the following:
javax.media.opengl.GLException: Context not current on current thread AWT-EventQueue-0: MacOSXPbufferCGLContext [OpenGL 2.1
Note that with GLJPanel this is not being called as a result of a call to display() [as I said, I ensure the context is current in this case], but is instead called when the panel gets a paintComponent() event. I tried overriding the GLJPanel to fix the problem with paintComponent() but find that the derived class never gets init() called. So I'm wondering whether GLJPanel is designed for inheritence or not?
Please also note that I also get the "context not current" message on Windows and Linux but they still render, on Mac Mountain Lion it does not render. Note: I'm not using the JoGL Animator classes (I notice there is some dependency inside GLCanvas and GLJPanel on whether an animator is registered or not, this seems a little backward, but I'm new to JoGL 2.0rc9 so perhaps there's something I'm missing?).
To summarize, these are the issues I'm having since moving to Mountain Lion (and JoGL 2.0rc9):
1) Using GLCanvas on the Mac fails with an exception stating that an unrecognized selector has been passed to the PBuffer.
2) Using GLJPanel fails with a "context not current" warning, and does not render.
3) Using GLCanvas on Windows and Linux renders, but the "context not current" warning is still given.
4) Using GLCanvas with an earlier version of JoGL (beginning of year, sorry don't know release number) worked on Mac, Windows, Linux without "context not current warnings".
5) Using the suggested workarounds of GLJPanel and multisampling with GLCanvas don't work for me.
I'm happy to help in any way I can (full stack traces, try anything out etc), and thanks to everyone who has made suggestions already.
Environment:
Hardware: 17" MacBook Pro mid 2009 (5,2)
Graphics: NVidia GeForce 9600M GT
OS X version: 10.8
JoGL version: 2.0rc9
Windows/Linux graphics: ATI Radeon 5970