having problems with glTexImage2D

i’m trying to write this line of code: gl.glTexImage2D(GL.GL_TEXTURE_2D,0,GL.GL_FLOAT_R32_NV, 16,16,0,GL.GL_LUMINANCE,GL.GL_FLOAT,data);

where data is a FloatBuffer of size 256. Anyhow I keep getting an error at runtime on this line that reads…

Illegally formatted version identifier: “null”
java.lang.IllegalArgumentException: Illegally formatted version identifier: “null”
at com.sun.opengl.impl.FunctionAvailabilityCache$Version.(FunctionAvailabilityCache.java:354)
at com.sun.opengl.impl.FunctionAvailabilityCache.initAvailableExtensions(FunctionAvailabilityCache.java:133)
at com.sun.opengl.impl.FunctionAvailabilityCache.isExtensionAvailable(FunctionAvailabilityCache.java:104)
at com.sun.opengl.impl.GLContextImpl.isExtensionAvailable(GLContextImpl.java:351)
at com.sun.opengl.impl.GLImpl.isExtensionAvailable(GLImpl.java:30494)
at com.sun.opengl.impl.GLImpl.initBufferObjectExtensionChecks(GLImpl.java:30639)
at com.sun.opengl.impl.GLImpl.checkUnpackPBODisabled(GLImpl.java:30674)
at com.sun.opengl.impl.GLImpl.glTexImage2D(GLImpl.java:21146)
at tester.test2.main(test2.java:83)
Caused by: java.lang.NullPointerException
at com.sun.opengl.impl.FunctionAvailabilityCache$Version.(FunctionAvailabilityCache.java:309)
… 8 more

I haven’t put in a null value anywhere and am wondering if I am using some combination of parameters incorrectly?

Thx for your help…

Noobus extrordinaire…

~Bolt

The only thing I can see that might cause this error would be: GL_FLOAT_R32_NV

it tries to find the value of that variable in the drivers (I think) and it fails, throwing an ugly error.

If this is the cause, you might want to file a bugreport at JOGL to make the Exception more descriptive.

using this link: http://www.java-gaming.org/forums/index.php?topic=17094.0

I was able to determine that the code had to be embedded inside of the draw routine as part of the GLEventListener in order for it to work. There are other issues that need to be worked, however this seemed to be the cause of this particular error. Hope this helps those that run into this…

~bolt