Can't get GL2 from GL2GL3 on Mac OSX
Posted by
orenbum on
Apr 09, 2014; 2:26pm
URL: https://forum.jogamp.org/Can-t-get-GL2-from-GL2GL3-on-Mac-OSX-tp4032133.html
I'm getting a "Not a GL2 implementation" exception when I try to get a GL2 object after requesting a GL2GL3 profile on Mac OSX with the latest version of jogl (2.1.5-01 from maven). On other platforms the code below executes without any errors:
public static void main(String[] args) throws Exception {
GLProfile profile = GLProfile.get(GLProfile.GL2GL3);
GLDrawableFactory drawableFactory = GLDrawableFactory.getFactory( profile );
GLCapabilities caps = new GLCapabilities( profile );
GLOffscreenAutoDrawable offscreenDrawable = drawableFactory.createOffscreenAutoDrawable( null, caps, null, 1, 1 );
offscreenDrawable.display( );
GLContext context = offscreenDrawable.getContext();
GL gl = context.getGL();
GL2 gl2 = gl.getGL2();
}
But on my macbook I get the following:
Exception in thread "main" javax.media.opengl.GLException: Not a GL2 implementation
at jogamp.opengl.gl4.GL4bcImpl.getGL2(GL4bcImpl.java:37087)
at com.oren.GL2Test.main(GL2Test.java:26)
So should we be able to get a GL2 object back there?
I'm running the latest version of OSX (10.9.2) and I believe my graphics drivers are up to date. I attached a dump of the context.toString() since that seemed to contain a bunch more information:
context.txt