Login  Register

Re: How do I interface JOGL with PowerVR OpenGL ES 2.0 dlls and libs on windows?

Posted by seahorse on Feb 21, 2012; 7:29am
URL: https://forum.jogamp.org/How-do-I-interface-JOGL-with-PowerVR-OpenGL-ES-2-0-dlls-and-libs-on-windows-tp3731608p3762852.html

I pasted both libEGL.dll and libGLESv2.dll (I am on windows 7) to C:\Program Files\Java\jdk1.6.0_26\bin(PATH)
But when I run TestRedsquareES2NEWT.java it runs fine with Nvidia card but gives following error with libGLESv2.dll from PowerVR.

ime: 13.015
There was 1 failure:
1) test02GLES2(com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT)
java.lang.RuntimeException: javax.media.opengl.GLException: Error creating OpenGL context: eglDisplay 0x2, eglConfig EGLGraphicsConfiguration[DefaultGraphicsScreen[EGLGraphicsDevice[type EGL, connection decon, unitID 0, handle 0x2], idx 0], eglConfigID 0x5,
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GLES2/GLES2]],
        chosen    GLCaps[0x5: vid 0x0, on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono  , hw, GLProfile[GLES2/GLES2], [GLES2]]], GLProfile[GLES2/GLES2], shareWith 0x0, error 0x3003
        at jogamp.newt.DefaultEDTUtil.invokeImpl(DefaultEDTUtil.java:189)
        at jogamp.newt.DefaultEDTUtil.invoke(DefaultEDTUtil.java:122)
        at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:191)
        at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:1587)
        at jogamp.newt.WindowImpl.setVisible(WindowImpl.java:783)
        at com.jogamp.newt.opengl.GLWindow.setVisible(GLWindow.java:336)
        at com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT.runTestGL(TestRedSquareES2NEWT.java:95)
        at com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT.test02GLES2(TestRedSquareES2NEWT.java:120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
        at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.junit.runners.Suite.runChild(Suite.java:128)
        at org.junit.runners.Suite.runChild(Suite.java:24)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
        at org.junit.runner.JUnitCore.runMain(JUnitCore.java:98)
        at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:53)
        at org.junit.runner.JUnitCore.main(JUnitCore.java:45)
        at com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT.main(TestRedSquareES2NEWT.java:134)
Caused by: javax.media.opengl.GLException: Error creating OpenGL context: eglDisplay 0x2, eglConfig EGLGraphicsConfiguration[DefaultGraphicsScreen[EGLGraphicsDevice[type EGL, connection decon, unitID 0, handle 0x2], idx 0], eglConfigID 0x5,
        requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GLES2/GLES2]],
        chosen    GLCaps[0x5: vid 0x0, on-scr, rgba 0x8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, dbl, mono  , hw, GLProfile[GLES2/GLES2], [GLES2]]], GLProfile[GLES2/GLES2], shareWith 0x0, error 0x3003
        at jogamp.opengl.egl.EGLContext.createImpl(EGLContext.java:190)
        at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:509)
        at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:428)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:412)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:361)
        at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:562)
        at com.jogamp.newt.opengl.GLWindow$1.windowResized(GLWindow.java:91)
        at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:2304)
        at jogamp.newt.WindowImpl.sendWindowEvent(WindowImpl.java:2247)
        at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:764)
        at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:775)
        at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:128)
        at jogamp.newt.DefaultEDTUtil$EventDispatchThread.run(DefaultEDTUtil.java:295)

FAILURES!!!
Tests run: 2,  Failures: 1

PVRVFrameSetGlesLibraryPath: C:\Program Files\Java\jdk1.6.0_26\bin\libGLES_CM.dll
PVRVFrameSetGlesv2LibraryPath: C:\Program Files\Java\jdk1.6.0_26\bin\libGLESv2.dll

==========================================================

 I noticed the file  EGLES2DynamicLibraryBundleInfo.java has the following
  // for windows distributions using the 'unlike' lib prefix
            // where our tool does not add it.
            libsGL.add("libGLESv2");
            libsGL.add("libGLESv2_CM");
            libsGL.add("libGLES20");

Do i need to change the first line to libGLESv2.dll?