diff options
author | Kenneth Russel <[email protected]> | 2005-06-05 05:49:36 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-06-05 05:49:36 +0000 |
commit | a0877519223902459c0c0324d32127538e230b8f (patch) | |
tree | 2e05332c427d781cbf2247f42047aeac659f52bc /src/net | |
parent | 90752caa7b31475d4fd424e8007ef2c9dd3851b5 (diff) |
Fixed bug pointed out by abegel on javagaming.org forums where
gluBuild2DMipmaps was failing on 1x1 textures
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@294 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/java/games/jogl/impl/mipmap/BuildMipmap.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java b/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java index 6a8a0b08d..9c9c3122b 100644 --- a/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java +++ b/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java @@ -306,12 +306,13 @@ public class BuildMipmap { if( baseLevel <= level && level <= maxLevel ) { gl.glTexImage2D( target, level, internalFormat, width, height, 0, format, type, data ); } - if( levels == 0 ) { + if( levels == 0 ) { /* we're done. clean up and return */ gl.glPixelStorei( GL.GL_UNPACK_ALIGNMENT, psm.getUnpackAlignment() ); gl.glPixelStorei( GL.GL_UNPACK_SKIP_ROWS, psm.getUnpackSkipRows() ); gl.glPixelStorei( GL.GL_UNPACK_SKIP_PIXELS, psm.getUnpackSkipPixels() ); gl.glPixelStorei( GL.GL_UNPACK_ROW_LENGTH, psm.getUnpackRowLength() ); gl.glPixelStorei( GL.GL_UNPACK_SWAP_BYTES, (psm.getUnpackSwapBytes() ? 1 : 0) ); + return( 0 ); } int nextWidth = newwidth / 2; int nextHeight = newheight / 2; @@ -1055,7 +1056,7 @@ public class BuildMipmap { gl.glTexImage3D( target, level, internalFormat, width, height, depth, 0, format, type, usersImage ); } - if( levels == 0 ) { + if( levels == 0 ) { /* we're done. clean up and return */ gl.glPixelStorei( GL.GL_UNPACK_ALIGNMENT, psm.getUnpackAlignment() ); gl.glPixelStorei( GL.GL_UNPACK_SKIP_ROWS, psm.getUnpackSkipRows() ); gl.glPixelStorei( GL.GL_UNPACK_SKIP_PIXELS, psm.getUnpackSkipPixels() ); |