MacOSX exception: BackingLayerHost w/ unknown handle
Posted by
standev on
Jan 15, 2019; 1:38pm
URL: https://forum.jogamp.org/MacOSX-exception-BackingLayerHost-w-unknown-handle-tp4039399.html
Hello people.
I am attempting to implement OpenGL based on some reference material. After adding all the necessary code,
I attempted to a run an unit test (the code of this can be found here:
https://pastebin.com/B5sKmU20.)
However, I get an error at line 81 " int res = glContext.makeCurrent();", the full error is disclosed below.
Can someone help me resolve this, I couldn't find any other threads of people experiencing similar issues.
Thanks in advance :)
Java version:
1.8.0_131 (1.8.0 update 131)
MacOSX version:
10.12.6 (macOS Sierra)
com.jogamp.opengl.GLException: BackingLayerHost w/ unknown handle (!FBO, !PBuffer): MacOSXOnscreenCGLDrawable[Realized true,
Factory jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@6d4e5011,
Handle 0x7fac1d0f8040,
Surface JAWTWindow[0x7e5afaa6][JVM version: 1.8.0_131 (1.8.0 update 131)
JAWT version: 0x80010004, CA_LAYER: true, isLayeredSurface true, bounds [ 0 / 0 100 x 78 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface true, attachedSurfaceLayer 0x0, windowHandle 0x7fac23914e30, surfaceHandle 0x7fac1d0f8040, bounds [ 0 / 0 100 x 78 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 100x78], pixels[scale 1.0, 1.0 -> 100x78], visible true, lockedExt false,
config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 69510216, unitID 0, awtDevice sun.awt.CGraphicsDevice@63a12c68, handle 0x0], idx 1],
chosen GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[auto-cfg]],
requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]],
CGLGraphicsConfig[dev=69510216,pixfmt=0],
encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x28f3b248]], idx 1],
chosen GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]],
requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]],
awtComponent java.awt.Canvas[canvas0,0,0,100x78],
surfaceLock <1b1426f4, 32b260fa>[count 1, qsz 0, owner <main>]]]
at jogamp.opengl.macosx.cgl.MacOSXCGLContext$NSOpenGLImpl.associateDrawable(MacOSXCGLContext.java:877)
at jogamp.opengl.macosx.cgl.MacOSXCGLContext.associateDrawable(MacOSXCGLContext.java:400)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:712)
at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
at org.empyrean.client.graphics.opengl.ShaderTest.before(ShaderTest.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)