Summary: | GLCanvas failed to initialize GL3(bc), GL4(bc) in SWING JFrame. GLJPanel succeed. | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | nickreserved <gessos.paul> |
Component: | opengl | Assignee: | Sven Gothel <sgothel> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | CC: | gouessej |
Priority: | P4 | ||
Version: | tbd | ||
Hardware: | All | ||
OS: | all | ||
Type: | DEFECT | SCM Refs: | |
Workaround: | --- | ||
Attachments: |
GPU Spec
Source code to reproduce problem Output of code (STDERR & STDOUT) |
We need a simple standalone test case and best w/ added std test & dbg info as shown here: https://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing Please reopen if bug still persist and reproducable w/ such test case. I walk the bug list currently and I cannot work with the given information. Thank you. Created attachment 817 [details]
Source code to reproduce problem
Created attachment 818 [details]
Output of code (STDERR & STDOUT)
Code works fine on my desktop PC, but not on my laptop PC. Error log is from my laptop. My laptop is Asus K53SD with dual GPUs: - nVidia as described in attachment GPU Spec (default for any application) - Intel HD Graphics 3000 (disabled for any application) (In reply to nickreserved from comment #4) > Code works fine on my desktop PC, but not on my laptop PC. > Error log is from my laptop. > My laptop is Asus K53SD with dual GPUs: > - nVidia as described in attachment GPU Spec (default for any application) > - Intel HD Graphics 3000 (disabled for any application) Are you sure that your laptop doesn't try to pick another GPU at runtime? We don't support Optimus. |
Created attachment 785 [details] GPU Spec JOGL 2.3.2 UPDATE: It seems that GLJPanel instead of GLCanvas, solves the problem My PC has an OpenGL 4.3 implementation. Following code run without problems: GLProfile glp = GLProfile.get(GLProfile.GL_PROFILE_LIST_MAX_PROGSHADER_CORE[0]); //GLProfile glp = GLProfile.getDefault(); //GLProfile glp = GLProfile.get(GLProfile.GL4); System.out.println(glp.getName()); // prints GL4 GLCapabilities caps = new GLCapabilities(glp); caps.setDepthBits(32); caps.setStencilBits(0); GLCanvas canvas = new GLCanvas(caps); canvas.addGLEventListener(this); canvas.setMinimumSize(new Dimension(600, 200)); When I use GL3, GL4 profile, init() never reached, with following exception: Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Unhandled OpenGL version/profile: 1.1 (Core profile, arb, compat[], FBO, software) at com.jogamp.opengl.GLContext.getGLProfile(GLContext.java:1814) at jogamp.opengl.GLContextImpl.createInstance(GLContextImpl.java:1464) at jogamp.opengl.GLContextImpl.setGLFunctionAvailability(GLContextImpl.java:1964) at jogamp.opengl.GLContextImpl.createContextARB(GLContextImpl.java:988) at jogamp.opengl.windows.wgl.WindowsWGLContext.createImpl(WindowsWGLContext.java:338) at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765) at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648) at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1279) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147) at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438) at com.jogamp.opengl.Threading.invoke(Threading.java:223) at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505) at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264) at sun.awt.RepaintArea.paint(RepaintArea.java:240) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358) at java.awt.Component.dispatchEventImpl(Component.java:4967) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) When I use default profile, library select "GL4bc". In that case, init() reached, but the following code in init(): GL4bc gl = glad.getGL().getGL4bc(); throws the following exception: Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught GLException: Not a GL4bc implementation on thread AWT-EventQueue-0 at com.jogamp.opengl.GLException.newGLException(GLException.java:76) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327) at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147) at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438) at com.jogamp.opengl.Threading.invoke(Threading.java:223) at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505) at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264) at sun.awt.RepaintArea.paint(RepaintArea.java:240) at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358) at java.awt.Component.dispatchEventImpl(Component.java:4967) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: com.jogamp.opengl.GLException: Not a GL4bc implementation at jogamp.opengl.gl4.GL4bcImpl.getGL4bc(GL4bcImpl.java:40456) at editor.LevelEditor.init(LevelEditor.java:131) at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644) at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667) at com.jogamp.opengl.awt.GLCanvas$10.run(GLCanvas.java:1407) at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291) ... 28 more Included libraries are: gluegen-rt-natives-windows-amd64.jar gluegen-rt.jar joal... jocl... jogl-all.jar jogl-all-natives-windows-amd64.jar