javax.media.opengl.GLException: Not a GL2ES1 implementation
After switching from jsr-231-2.0-beta10 build (from Kenai) to a later build (tested back to 10-June) I get
javax.media.opengl.GLException: Not a GL2ES1 implementation when running my application.
I had to update some package references for GLUT and KeyEvent (now in com.jogamp) but everything at least compiled fine.
Added code to query that glprofile and glcontext really is GL2ES1 and they return true.
When calling glContext.getGL().getGL2ES1(); I get the exception.
I create my glcontext this way, two parts in different subclasses in order to support multiple profiles - I have substituted some fields to make it more readable (eg the GLProfile.GL2)
On Thursday, September 23, 2010 13:49:09 Richard Sahlin [via jogamp] wrote:
> After switching from jsr-231-2.0-beta10 build (from Kenai) to a later build
> (tested back to 10-June) I get
> javax.media.opengl.GLException: Not a GL2ES1 implementation when running my
> I had to update some package references for GLUT and KeyEvent (now in
> com.jogamp) but everything at least compiled fine.
> Added code to query that glprofile and glcontext really is GL2ES1 and they
> return true.
> When calling glContext.getGL().getGL2ES1(); I get the exception.
Sure, a GL2 profile is also GL2ES1 and GL2ES2, it's super-interfaces.
Please send the exception, whole stack trace and the usual information,
build .. ie file url, date, best: hudson build/git ref :)
> I create my glcontext this way, two parts in different subclasses in order
> to support multiple profiles - I have substituted some fields to make it
> more readable (eg the GLProfile.GL2)
> Part 1:
> GLProfile glp = GLProfile.get(GLProfile.GL2);
> AWTGraphicsScreen screen =
> AWTGraphicsConfiguration config = (AWTGraphicsConfiguration)
> chooseGraphicsConfiguration(new GLCapabilities(glp), null, screen);
> GLCanvas glCanvas = new GLCanvas(config);
> glCanvas.setSize(width, height);
> Part 2, gets the glCanvas + some app config params.
> NativeWindow win = NativeWindowFactory.getNativeWindow(glCanvas,
> GLProfile profile = GLProfile.get(GLProfile.GL2);
> glDrawable =
> GLContext context = glDrawable.createContext(null);
> Is there any obvious fault with how I am setting up GL?
> ps - Use the AWT stuff because we need to drive rendering by our own and not
> the autodrawable.
> Best regards
> Richard Sahlin
> View message @ http://jogamp.762907.n3.nabble.com/javax-media-opengl-GLException-Not-a-GL2ES1-implementation-tp1567521p1567521.html > To start a new topic under jogamp, email [hidden email] > To unsubscribe from jogamp, click http://jogamp.762907.n3.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=762907&code=c2dvdGhlbEBqYXVzb2Z0LmNvbXw3NjI5MDd8NDU1NjU4MjUx >
Re: javax.media.opengl.GLException: Not a GL2ES1 implementation
Hi and thanks for the reply.
Here is the stacktrace:
Exception in thread "main" javax.media.opengl.GLException: Not a GL2ES1 implementation
If I explicitly cast the profile with
gles1 = (GL2ES1) glContext.getGL();
there is a nullpointer exception when accessing gles1, eg when setting the hint:
Exception in thread "main" java.lang.NullPointerException
On Cent OS 5.3, I do this:
// get the profile
GLProfile profile = GLProfile.getDefault();
// this allows us to set particular properties for the GLCanvas
GLCapabilities glCapabilities = new GLCapabilities(profile);
final GL2 gl = GLContext.getCurrentGL().getGL2();
final GL2ES1 gl2es1 = GLContext.getCurrentGL().getGL2ES1();
and it works fine, gl2es1 is not null. I use the latest build.
Now trying to get it running on Win XP with latest aggregated build (pre20100924)
I have tried the setup that you mentioned, though I don't know if you create the GLDrawable as I do (see above)
It seems that the best I can get is this (other alternative gives nullpointer exception when accessing gles1 or NotGL2ES1implementation error)
Exception in thread "main" javax.media.nativewindow.NativeWindowException: Unable to lock surface
Is the problem perhaps related to the way I create the GLCanvas or how I get the NativeWIndow?
Any help would be greatly appreciated - we need to use both GLES1 and GLES2 on desktop since we are building a toolchain for our Mobile software suit and want to run the same code (all GLES specifics are abstracted to porting classes) an both desktop and mobile.
This is really the only obstacle that prevents us from having a unified dev environment.