在某平台上,运行得到错误:
java.lang.InterruptedException com.jogamp.opengl.GLException: J3D-Renderer-1: createImpl ARB n/a but required, profile > GL2 requested (OpenGL >= 3.1). Requested: GLProfile[GL3bc/GL3bc.hw], current: 3.0 (Compat profile, compat[ES2], FBO, hardware) - 3.0 Mesa 18.0.5 at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:440) 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 javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6411) at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4612) at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2386) at javax.media.j3d.Renderer.doWork(Renderer.java:881) at javax.media.j3d.J3dThread.run(J3dThread.java:271) DefaultRenderingErrorListener.errorOccurred: CONTEXT_CREATION_ERROR: Renderer: Error creating Canvas3D graphics context graphicsDevice = X11GraphicsDevice[screen=0] canvas = javax.media.j3d.PGCanvas3D[canvas0,0,0,1224x688] X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 3/3, reusable (open, marked uncloseable): 0, pending (open in creation order): 3) X11Util: Open X11 Display Connections: 3 X11Util: Open[0]: NamedX11Display[:0.0, 0x7f40eb15f0, refCount 1, unCloseable false] X11Util: Open[1]: NamedX11Display[:0.0, 0x7f200567d0, refCount 1, unCloseable false] X11Util: Open[2]: NamedX11Display[:0.0, 0x7f24006890, refCount 1, unCloseable false]
当时有点傻眼。结果网上找到一篇文章,更新jar包得以解决。提供一个下载链接:具体的说:
下载GLContextImpl.class
https://download.csdn.net/download/quantum7/12326854
替换jogl-all.jar中的jogamp/opengl目录下同名文件