Login  Register

Re: GL-CL interoperability in OSX

Posted by ac on Apr 20, 2011; 1:24am
URL: https://forum.jogamp.org/GL-CL-interoperability-in-OSX-tp2837450p2840960.html

It seems that I cannot create a GL3/GL4 context. If I do:

profile = GLProfile.getDefault();
...
GLDrawableFactory factory = GLDrawableFactory.getFactory(profile);
drawable = factory.createGLDrawable(win);
context = drawable.createContext(null);  

my profile is created as [GL2/GL2]. If I try profile = GLProfile.get(GLProfile.GL4bc), or any other profile after GL3, I get a "java.lang.RuntimeException: Cannot get a valid OpenGL profile".

However, if I keep using the default profile, then the GL object associated to the context seems to be of type jogamp.opengl.gl4.GL4bcImpl. But if I try context.getGL().getGL4bc(), then I get "GLException: Not a GL4bc implementation"

BTW, I'm using jocl-0.9-b330-20110411-macosx-universal. My application works inside an AWT window, just in case this information is useful.

So my questions here are:
* How to explicitly create a GL3/GL4 context? Is there something in the initialization I'm missing? Is this a current limitation in OSX? I'm running 10.6.7, everything up-to-date as far as I know.
* Is this issue related to the problem I mentioned in the first post, where I cannot create a CLGLContext?

Any insights will be greatly appreciated,
Andres