I have been working on a game recently using the Xith engine. However, I’m running into trouble with both JOGL and LWJGL, depending on what machines I try to run the game on.
When using JOGL on my machine, the performance is terrible. I’m using a while loop that calls view.RenderOnce, and even though that loop is being executed many times, the screen doesn’t update more than about once every second or so. However, LWJGL works fine.
The computer this is happening on is a PC running Windows XP, with a ATI Radeon 9200 SE.
One several other computers, using LWJGL, the game quits when view.renderOnce is called, giving the following error messages:
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
at org.lwjgl.opengl.Display.update(Display.java:468)
at com.xith3d.render.lwjgl.CanvasPeerImpl.renderDone(CanvasPeerImpl.java:798)
at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:984)
at com.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
at com.xith3d.scenegraph.View.renderOnce(View.java:591)
at com.xith3d.scenegraph.View.renderOnce(View.java:524)
at eleconics.ViewWindow.startView(ViewWindow.java:242)
at eleconics.ViewWindow.main(ViewWindow.java:28)
java.lang.Error: org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:1013)
at com.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
at com.xith3d.scenegraph.View.renderOnce(View.java:591)
at com.xith3d.scenegraph.View.renderOnce(View.java:524)
at eleconics.ViewWindow.startView(ViewWindow.java:242)
at eleconics.ViewWindow.main(ViewWindow.java:28)
Caused by: org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
at org.lwjgl.opengl.Display.update(Display.java:468)
at com.xith3d.render.lwjgl.CanvasPeerImpl.renderDone(CanvasPeerImpl.java:798)
at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:984)
… 5 more
Exception in thread “main”
and
org.lwjgl.opengl.OpenGLException: Invalid enum (1280)
at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
at org.lwjgl.opengl.Display.update(Display.java:468)
at com.xith3d.render.lwjgl.CanvasPeerImpl.renderDone(CanvasPeerImpl.java:798)
at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:984)
at com.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
at com.xith3d.scenegraph.View.renderOnce(View.java:591)
at com.xith3d.scenegraph.View.renderOnce(View.java:524)
at eleconics.ViewWindow.startView(ViewWindow.java:242)
at eleconics.ViewWindow.main(ViewWindow.java:28)
Exception in thread “main” java.lang.Error: org.lwjgl.opengl.OpenGLException: Invalid enum (1280)
at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:1013)
at com.xith3d.render.lwjgl.CanvasPeerImpl.render(CanvasPeerImpl.java:1061)
at com.xith3d.scenegraph.View.renderOnce(View.java:591)
at com.xith3d.scenegraph.View.renderOnce(View.java:524)
at eleconics.ViewWindow.startView(ViewWindow.java:242)
at eleconics.ViewWindow.main(ViewWindow.java:28)
Caused by: org.lwjgl.opengl.OpenGLException: Invalid enum (1280)
at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
at org.lwjgl.opengl.Display.update(Display.java:468)
at com.xith3d.render.lwjgl.CanvasPeerImpl.renderDone(CanvasPeerImpl.java:798)
at com.xith3d.render.lwjgl.CanvasPeerImpl.display(CanvasPeerImpl.java:984)
… 5 more
The first set of errors listed were generated on a PC with a GeForce2 MX.
The second set were from a Mac with the following specs:
Hardware Overview:
Machine Model: PowerBook G4 12"
CPU Type: PowerPC G4 (3.3)
Number Of CPUs: 1
CPU Speed: 867 MHz
L2 Cache (per CPU): 256 KB
Memory: 640 MB
Bus Speed: 133 MHz
Boot ROM Version: 4.5.5f4
GeForce4 MX:
Type: display
Bus: AGP
VRAM (Total): 32 MB
Vendor: nVIDIA (0x10de)
Device ID: 0x0179
Revision ID: 0x00a5
ROM Revision: 2030
The same error was generated on a PC with the following graphics specs:
SiS M650, 32MB ram, integrated chipset model.
PC: 3.07 ghz, 480 MB ram
The game, when compiled with JOGL, runs fine on all three of those machines.
Finally, the game runs fine in both LWJGL and JOGL on a PC with an ATI Radeon 9800
In all of these cases, the LWJGL and JOGL demos that are provided on the respective sites, running outside of Xith, work fine.
Any suggestions as to how these problems, or even hints as to what might be causing them, would be greatly appreciated.