Login  Register

javax.media.opengl.GLException: Not a GL2ES1 implementation

Posted by Richard Sahlin on Sep 23, 2010; 11:49am
URL: https://forum.jogamp.org/javax-media-opengl-GLException-Not-a-GL2ES1-implementation-tp1567521.html

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)

Part 1:

   GLProfile glp = GLProfile.get(GLProfile.GL2);
   AWTGraphicsScreen screen = (AWTGraphicsScreen)AWTGraphicsScreen.createDefault();
   AWTGraphicsConfiguration config = (AWTGraphicsConfiguration)
       GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).
       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, glCanvas.getAWTConfig());
    win.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
    GLProfile profile = GLProfile.get(GLProfile.GL2);
    glDrawable = GLDrawableFactory.getFactory(profile).createGLDrawable(win);
    GLContext context = glDrawable.createContext(null);
    glCanvas.setGLDrawable(glDrawable);

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.
ds
Best regards
Richard Sahlin