Cannot initialize GL3(bc), GL4(bc) with SWING's JFrame

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot initialize GL3(bc), GL4(bc) with SWING's JFrame

nickreserved
This post was updated on .
My PC has an OpenGL 4.4 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

So, what I does so wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Cannot initialize GL3(bc), GL4(bc) with SWING's JFrame

nickreserved
It seems that GLJPanel instead of GLCanvas, solves the problem
Reply | Threaded
Open this post in threaded view
|

Re: Cannot initialize GL3(bc), GL4(bc) with SWING's JFrame

gouessej
Administrator
Please fill a detailed bug report anyway. I'd like to know more about your machine.
Julien Gouesse | Personal blog | Website