Thanks guys, finally I could run Gears.java in linux! Is a good graphics card really needed for jogl to work in Linux properly??
I tried porting my application over to linux but faced the following error which was non-existence in windows xp
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CD5C437
Function=XVisualIDFromVisual+0x7
Library=/usr/X11R6/lib/libX11.so.6
Current Java thread:
at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo0(Native Method)
at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo(JAWT_DrawingSurface.java:42)
at net.java.games.jogl.impl.x11.X11OnscreenGLContext.lockSurface(X11OnscreenGLContext.java:167)
at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:108)
- locked <0x44487ad8> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
- locked <0x44487ad8> (a net.java.games.jogl.impl.x11.X11OnscreenGLContext)
at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:119)
at java.awt.Component.setBounds(Component.java:1665)
at java.awt.BorderLayout.layoutContainer(BorderLayout.java:683)
- locked <0x448f2d00> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.layout(Container.java:1017)
at java.awt.Container.doLayout(Container.java:1007)
at java.awt.Container.validateTree(Container.java:1089)
at java.awt.Container.validate(Container.java:1064)
- locked <0x448f2d00> (a java.awt.Component$AWTTreeLock)
at java.awt.Window.pack(Window.java:438)
at cube.<init>(cube.java:164)
at cube.main(cube.java:440)I used a GLCanvas, placing it in a JFrame
1 2 3 4 5 6 7 8 9 10 11
| final Container c = getContentPane(); c.setLayout(new BorderLayout());
glc = GLDrawableFactory.getFactory().createGLCanvas(cap); glc.setSize(640,480); glc.requestFocus(); glc.addGLEventListener(view);
c.add( "Center", glc ); pack(); show(); |