Hi there,
running a simpe JOGL test case on my up-to-date Debian-unstable box (ATI Radeon 9600 graphics card, standard xorg-ati driver) using the current 1.1.1-rc8, I get the following exception:
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Error making context current
at com.sun.opengl.impl.x11.X11GLContext.makeCurrentImpl(X11GLContext.java:141)
at com.sun.opengl.impl.x11.X11OffscreenGLContext.makeCurrentImpl(X11OffscreenGLContext.java:74)
at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
at javax.media.opengl.GLJPanel.paintComponent(GLJPanel.java:661)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5129)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
at javax.swing.JComponent.paint(JComponent.java:1013)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1797)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:734)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
The test app’s source code:
package test.jogl;
import java.awt.*;
import javax.swing.*;
import javax.media.opengl.*;
public class JOGLTest extends JFrame implements GLEventListener {
public static void main(String[] argv) {
JOGLTest j = new JOGLTest();
j.setLocation(100, 100);
j.setSize(640, 480);
j.setLayout(new BorderLayout());
GLCapabilities caps = new GLCapabilities();
GLAutoDrawable canvas = new GLJPanel(caps);
j.getContentPane().add((Component)canvas, BorderLayout.CENTER);
j.setVisible(true);
}
public void init(GLAutoDrawable d) {
}
public void display(GLAutoDrawable d) {
}
public void reshape(GLAutoDrawable d, int i, int x, int width, int height) {
}
public void displayChanged(GLAutoDrawable d, boolean modeChanged, boolean deviceChanged) {
}
}
When using a GLCanvas instead of a GLJPanel, everything works fine (well, nothing gets drawn, obviously).
BTW, I’ve had this problem with several previous JOGL versions as well.
Any ideas?
Regards –
Torsten