I tried to implement texturing in my JOGL applet based on NEHE texture port but I get this exception:
Exception in thread "Thread-3" java.lang.IllegalArgumentException: Illegally formatted version identifier: "null"
at com.sun.opengl.impl.FunctionAvailabilityCache$Version.<init>(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 javalayer.Bitmap.makeRGBTexture(Bitmap.java:69)
at javalayer.Bitmap.<init>(Bitmap.java:27)
at javalayer.Test.run(Test.java:55)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.sun.opengl.impl.FunctionAvailabilityCache$Version.<init>(FunctionAvailabilityCache.java:309)
... 11 more
All from here:
private void makeRGBTexture(GL gl, GLU glu, TextureReader.Texture img, int target, boolean mipmapped) {
if (mipmapped) {
glu.gluBuild2DMipmaps(target, GL.GL_RGB8, img.getWidth(), img.getHeight(), GL.GL_RGB, GL.GL_UNSIGNED_BYTE, img.getPixels());
} else {
gl.glTexImage2D(target, 0, GL.GL_RGB, img.getWidth(), img.getHeight(), 0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, img.getPixels());
}
}
mipmapped is false.
It’s just a 512x512 32-bit png image.