Login  Register

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

Posted by Richard Sahlin on Oct 08, 2010; 3:50pm
URL: https://forum.jogamp.org/javax-media-opengl-GLException-Not-a-GL2ES1-implementation-tp1567521p1666118.html

Hi

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
        at com.jogamp.nativewindow.impl.jawt.windows.WindowsJAWTWindow.lockSurfaceImpl(WindowsJAWTWindow.java:80)
        at com.jogamp.nativewindow.impl.jawt.JAWTWindow.lockSurface(JAWTWindow.java:112)
        at com.jogamp.opengl.impl.GLDrawableImpl.lockSurface(GLDrawableImpl.java:173)
        at com.jogamp.opengl.impl.GLContextImpl.makeCurrentLocking(GLContextImpl.java:352)
        at com.jogamp.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:314)

with the following init:

    NativeWindow win = NativeWindowFactory.getNativeWindow(glCanvas, glCanvas.getAWTConfig());
    GLProfile profile = GLProfile.getDefault();
    GLDrawable glDrawable = GLDrawableFactory.getFactory(profile).createGLDrawable(win);

    context = glDrawable.createContext(null);
    glCanvas.setGLDrawable(glDrawable);
<snip>
    context.makeCurrent();  //This will give the unable to lock surface exception


The GLCanvas is created before the init as follows:

  GLProfile glp = GLProfile.getDefault();
  AWTGraphicsScreen screen = (AWTGraphicsScreen)AWTGraphicsScreen.createDefault();
  AWTGraphicsConfiguration config = (AWTGraphicsConfiguration)
       GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(new GLCapabilities(glp), null, screen);

  GLCanvas glCanvas = new GLCanvas(config);

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.

Regards
/Richard