Texture.getImageTexCoords() against Texture.getSubImageTexCoords()

With JSR231-B03 when I called getImageTexCoords I got back (0,0,1,1) for a rectangular image. When I called getSubImageTexCoords with the image ‘dimensions’ I got back what I was expecting. The two methods seem to disagree.

Do you have a small test case indicating the difference in behavior?

Are you using a non-square texture? It looks like the behavior is subtly different in this case when GL_TEXTURE_RECTANGLE_ARB isn’t available. I believe both of these methods have been tested fairly well though and seem to be working. Both, in particular, should return either normalized texture coordinates (0…1) when the texture rectangle extension isn’t in use, and pixel coordinates (0…image width/height) when it is in use.

The image is non-square. Judging by the texture coords which work GL_TEXTURE_RECTANGLE_ARB is being used. This is on OSX using Gerard Ziemski’s universal binary. I will try to create a test case.

See attached for the quickest test case I could put together. There may be something in my assumptions about how these methods work.

Thanks for the concise test case. A bug fix has been checked in to the Texture class which makes it work correctly; this fix will be present in the nightly builds dated 4/13 or later.

Great - thanks for the quick turnaround! The new Texture classes do simplify life.