Hi,
I’m pointing a GL4Java app to JOGL. The GL4Java version runs great on my machine (a ThinkPad T40p). But I can’t get the code modified for JOGL to run.
When I use the September 2003 builds and DebugGL, I get a GL_INVALID_ARGUMENT exception after calling:
gl.glMatrixMode(GL.GL_MODELVIEW);
which seems surprising since that’s not even listed as an error code for that function. I’ve run a TraceGL and nothing to unusual is going on.
So then I commented out the line and ran again. Now I get:
glBindTexture(3553,1)
java.lang.NullPointerException
at java.lang.reflect.Array.getLength(Native Method)
at net.java.games.jogl.TraceGL.dumpArray(TraceGL.java:13672)
at net.java.games.jogl.TraceGL.glTexImage2D(TraceGL.java:10556)
at agile2d.opengl.Texture.create(Texture.java:281)
at agile2d.opengl.Texture.loadPixels(Texture.java:164)
OK. So clearly TraceGL has some issues in the Sept builds. I decided to switch to the nightly builds.
Using yesterday’s build, now I get:
net.java.games.jogl.GLException: Method "wglGetExtensionsStringARB" not availabl
e at net.java.games.jogl.impl.windows.WindowsGLImpl.wglGetExtensionsString
ARB(WindowsGLImpl.java:30520) at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:273)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:204)
at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:133)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent
(WindowsOnscreenGLContext.java:110)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:203)
Which is confusing. If GL4Java can run this code ok on my machine, JOGL should handle it too. I’m on Windows XP with Service Pack 2, Java 1.4.2.
Any comments/suggestions really welcome.
The code I’m porting is Agile2D, an implementation of Graphics2D that runs on OpenGL. It would be cool to have it running via JOGL.
Cheers
Jon