I run into problems with jogl 2:
Exception in thread "main" java.lang.RuntimeException: Unable to initialize JAWT at com.sun.nativewindow.impl.jawt.JAWT$1.run(JAWT.java:100) at java.security.AccessController.doPrivileged(Native Method) at com.sun.nativewindow.impl.jawt.JAWT.getJAWT(JAWT.java:95) at com.sun.nativewindow.impl.jawt.JAWTUtil.lockToolkit(JAWTUtil.java:118) at com.sun.nativewindow.impl.x11.awt.X11AWTNativeWindowFactory$1.lock(X11AWTNativeWindowFactory.java:67) at com.sun.opengl.impl.x11.glx.awt.X11AWTGLXGraphicsConfigurationFactory.chooseGraphicsConfiguration(X11AWTGLXGraphicsConfigurationFactory.java:91) at javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:702) at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:393) at java.awt.Container.addNotify(Container.java:2639) at javax.swing.JComponent.addNotify(JComponent.java:4687) at java.awt.Container.addNotify(Container.java:2639) at javax.swing.JComponent.addNotify(JComponent.java:4687) at java.awt.Container.addNotify(Container.java:2639) at javax.swing.JComponent.addNotify(JComponent.java:4687) at javax.swing.JRootPane.addNotify(JRootPane.java:750) at java.awt.Container.addNotify(Container.java:2639) at java.awt.Window.addNotify(Window.java:668) at java.awt.Frame.addNotify(Frame.java:486) at java.awt.Window.show(Window.java:859) at java.awt.Component.show(Component.java:1464) at java.awt.Component.setVisible(Component.java:1416) at java.awt.Window.setVisible(Window.java:842) at endrov.modelWindow.TestJOGL.main(TestJOGL.java:63)
==================
and this from the easiest test ever:
public static void main(String[] args)
{
///create a profile, in this case OpenGL 3.1 or later
GLProfile profile = GLProfile.get(GLProfile.GL3);
//configure context
GLCapabilities capabilities = new GLCapabilities(profile);
capabilities.setNumSamples(2); // enable anti aliasing - just as a example
capabilities.setSampleBuffers(true);
//initialize a GLDrawable of your choice
GLCanvas canvas = new GLCanvas(capabilities);
//register GLEventListener
canvas.addGLEventListener(new GLEventListener()
{
public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3,
int arg4)
{
}
public void init(GLAutoDrawable arg0)
{
}
public void dispose(GLAutoDrawable arg0)
{
}
public void display(GLAutoDrawable drawable)
{
GL3 gl = drawable.getGL().getGL3();
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
}
});
//... (start rendering thread -> start rendering...)
JFrame frame=new JFrame();
frame.add(canvas);
frame.setSize(200, 100);
frame.add(canvas);
frame.setVisible(true);
}
but! the webstart demos work. any ideas?
ubuntu 9.10 x86