diff options
author | Kenneth Russel <[email protected]> | 2007-04-21 02:12:03 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-04-21 02:12:03 +0000 |
commit | 3827e79351d502be423eca5ee1ed23b45b1a0ab6 (patch) | |
tree | 8d659e8d407ca09ff9cf75ebac57e7f84615360b /src/classes/com/sun/opengl/util/texture/TextureIO.java | |
parent | d22ef032e84a79f86683db1e2f829f403c4bb3e2 (diff) |
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
Diffstat (limited to 'src/classes/com/sun/opengl/util/texture/TextureIO.java')
-rwxr-xr-x | src/classes/com/sun/opengl/util/texture/TextureIO.java | 10 |
1 files changed, 9 insertions, 1 deletions
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); } |