Hi, I’ll connect to this thread, because my problem also concern GearsApplet. I cannot get it to work either as a application or a applet. I’m using jogl-2.0, jdk1.6(update 14 on ubuntu 9.04). In eclipse I’m adding following jars : gluegen-rt.jar,jogl.all.jar,nativewindow.all.jar(+ paths to the native libraries for each .jar).
Compilation goes right, problem begins when I’m trying to run GearsApplet.
In console I get long list full of erros like :
Exception in thread "Timer-0" javax.media.opengl.GLException: javax.media.opengl.GLException: Error making context current
at com.sun.opengl.impl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:101)
at com.sun.opengl.impl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:190)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:549)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:290)
at com.sun.opengl.util.AnimatorImpl.display(AnimatorImpl.java:50)
at com.sun.opengl.util.Animator.display(Animator.java:131)
at com.sun.opengl.util.FPSAnimator$1.run(FPSAnimator.java:95)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
...
Exception in thread "AWT-EventQueue-1" javax.media.opengl.GLException: Error making context (new) current: display 0x96fa1b8, context 0x9a2b178, drawable com.sun.opengl.impl.x11.glx.X11OnscreenGLXDrawable[realized true,
requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
chosen GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
window JAWT-Window[windowHandle 0x3000024, surfaceHandle 0x3000024, pos 0/0, size 200x200, visible true, locked true,
config class javax.media.nativewindow.awt.AWTGraphicsConfiguration[class javax.media.nativewindow.awt.AWTGraphicsScreen[class javax.media.nativewindow.awt.AWTGraphicsDevice[type AWT, awtDevice X11GraphicsDevice[screen=0], handle 0x96fa1b8], idx 0],
chosen GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x27],
encapsulated X11GLXGraphicsConfiguration[class javax.media.nativewindow.x11.X11GraphicsScreen[class javax.media.nativewindow.x11.X11GraphicsDevice[type X11, handle 0x96fa1b8], idx 0], visualID 0x27, fbConfigID 0xa1,
requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
chosen GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false]]],
wrappedWindow AWT-GLCanvas[ class javax.media.nativewindow.awt.AWTGraphicsConfiguration[class javax.media.nativewindow.awt.AWTGraphicsScreen[class javax.media.nativewindow.awt.AWTGraphicsDevice[type AWT, awtDevice X11GraphicsDevice[screen=0], handle 0x96fa1b8], idx 0],
chosen GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
requested GLCapabilities[Capabilities[Red: 8, Green: 8, Blue: 8, Alpha: 0, Opaque: true], GL profile: GLProfile[GL2/GL2], DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false],
X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x27],
...
...
...
I noticed, that problem is with adding GLCanvas(if I uncomment “add(canvas, BorderLayout.CENTER);” in GearsApplet.java and “frame.add(canvas);” in Gears.java it doesn’t show any errors at run time).
So how can I display GLCanvas(in jogl-2.0, jogl-1.1 worked) on the screen without getting any errors ?
Thanks in advance and sorry for my poor English.