From 3827e79351d502be423eca5ee1ed23b45b1a0ab6 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sat, 21 Apr 2007 02:12:03 +0000 Subject: Fixed Issue 296: TextureIO cube map support broken Fixed code paths supporting cube maps. As a positive side-effect, the VertexProgRefract demo's cube map is now rendered completely correctly; inversion of the positive and negative Y images, and the negative Y scale factor on the texture matrix, are no longer needed, and the seams around the top image are gone. Fixed code relating to automatic mipmap generation in the presence of only GL_ARB_texture_rectangle and not GL_ARB_texture_non_power_of_two. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1212 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/util/texture/TextureIO.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/classes/com/sun/opengl/util/texture/TextureIO.java') diff --git a/src/classes/com/sun/opengl/util/texture/TextureIO.java b/src/classes/com/sun/opengl/util/texture/TextureIO.java index f1ac85ebd..fe7dacee4 100755 --- a/src/classes/com/sun/opengl/util/texture/TextureIO.java +++ b/src/classes/com/sun/opengl/util/texture/TextureIO.java @@ -646,7 +646,7 @@ public class TextureIO { (height + (2 * border)) * bytesPerPixel); if (DEBUG) { - System.err.println("Allocated buffer of size " + res.remaining() + " for fetched image (" + + System.out.println("Allocated buffer of size " + res.remaining() + " for fetched image (" + ((fetchedFormat == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA") + ")"); } gl.glGetTexImage(GL.GL_TEXTURE_2D, 0, fetchedFormat, GL.GL_UNSIGNED_BYTE, res); @@ -855,6 +855,10 @@ public class TextureIO { if (img == null) { return null; } + if (DEBUG) { + System.out.println("TextureIO.newTextureData(): BufferedImage type for " + file + " = " + + img.getType()); + } return new TextureData(internalFormat, pixelFormat, mipmap, img); } @@ -867,6 +871,10 @@ public class TextureIO { if (img == null) { return null; } + if (DEBUG) { + System.out.println("TextureIO.newTextureData(): BufferedImage type for stream = " + + img.getType()); + } return new TextureData(internalFormat, pixelFormat, mipmap, img); } -- cgit v1.2.3