G'day kids,
I currently have a VB.NET/DirectX application that I would like to port to Java so that it is cross-platform.
I have tested both JOGL and LWJGL, and interestingly I have come up with the same problem for both libraries - that is, that I can't seem to get it to run over a network with an XWindows emulator.
First I tried running SuSE 9.1 as the host, telnetted to it from XP using Exceed XWindows program, and then ran my Java/JOGL application, where I get the following error:
Quote
Exception in thread "main" javax.media.opengl.GLException: glXGetConfig failed: error code GLX_NO_EXTENSION
at com.sun.opengl.impl.x11.X11GLDrawableFactory.glXGetConfig(X11GLDrawableFactory.java:499)
at com.sun.opengl.impl.x11.X11GLDrawableFactory.xvi2GLCapabilities(X11GLDrawableFactory.java:300)
at com.sun.opengl.impl.x11.X11GLDrawableFactory.chooseGraphicsConfiguration(X11GLDrawableFactory.java:144)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:113)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:82)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:75)
at javaapplication2.JRender.<init>(JRender.java:27)
at javaapplication2.Main.main(Main.java:12)
I couldn't solve that one, so I converted my test app to LWJGL, and now I get the error:
Quote
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: org.lwjgl.LWJGLException: Could not initialize GLX
at org.lwjgl.opengl.AWTGLCanvas.paint(AWTGLCanvas.java:261)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:630)
at java.awt.Component.dispatchEventImpl(Component.java:4031)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: org.lwjgl.LWJGLException: Could not initialize GLX
at org.lwjgl.opengl.LinuxContextImplementation.nCreate(Native Method)
at org.lwjgl.opengl.LinuxContextImplementation.create(LinuxContextImplementation.java:50)
at org.lwjgl.opengl.Context.<init>(Context.java:123)
at org.lwjgl.opengl.AWTGLCanvas.paint(AWTGLCanvas.java:248)
So it looks to my untrained eye to be basically the same problem.
Just to make sure it wasn't an XP to Linux OGL problem, I tried to run the program over the network from an SGI IRIX machine too, and basically get the same error.
Hope someone can help, because I am all Googled out.
Pinky!
You probably need a more capable X-Window emulator. Many X-Window emulators do not support OpenGL (a.k.a GLX). Perhaps
Reflection from AttachmateWRQ (formerly ReflectionX), http://www.attachmate.com/en-US/Products/Terminal+Emulation/Reflection/reflection.htm
A Java implementation with GLX support is under development here: http://percro.sssup.it/~pit/weirdxglx/index.html.
You may also be able to find a version of VNC which supports OpenGL. I've seen hints that this may be possible, but I haven't found a version with confirmed support for OpenGL.
VirtualGL (http://virtualgl.sourceforge.net/index.html) might also be a possibility.
**EDIT** - I used Cygwin/X and JOGL works fine. LWJGL still doesn't, so JOGL wins. For what I want to do JOGL has everything anyway, I don't need sound or any of that garbage, it's an engineering application.
--------------------------------
Hey baysmith,
Thanks for quick reply. I checked Exceed to find out if it had GLX support, and found this settings screen:
(http://img224.imageshack.us/img224/4172/image19xh.th.jpg) (http://img224.imageshack.us/my.php?image=image19xh.jpg)
Which seems to be alright.
So then I tried to run 'glxgears' from my XP box, telnetting to Linux box, and I get the error:
Quote
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 139 (GLX)
Minor opcode of failed request: 21 ()
Serial number of failed request: 10
Current serial number in output stream: 10
Which is interesting. So I tried the OpenGL game 'enigma', which works fine :?
So then I tried to do the same from my IRIX box telnetting to the Linux box, and 'glxgears' runs fine like that - but my test JOGL or LWJGL apps still don't work :(
Unfortunately I don't have another Linux box handy, so I am unable to try Linux to Linux telnet - that is an essential requirement for me to port this application.
Thanks for your suggestions, I will check out the servers you mentioned.