aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/util/texture/Texture.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/util/texture/Texture.java')
-rwxr-xr-xsrc/classes/com/sun/opengl/util/texture/Texture.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java
index ec3692196..957f91490 100755
--- a/src/classes/com/sun/opengl/util/texture/Texture.java
+++ b/src/classes/com/sun/opengl/util/texture/Texture.java
@@ -40,7 +40,6 @@ import java.nio.*;
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
-import javax.media.opengl.glu.gl2.*;
import com.sun.opengl.impl.*;
import com.sun.opengl.util.texture.*;
import com.sun.opengl.util.texture.spi.*;
@@ -519,13 +518,11 @@ public class Texture {
}
try {
- if(gl.isGL2()) {
- // FIXME: need to get rid of this cast
- GLUgl2 glu = (GLUgl2) GLU.createGLU();
- glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(),
- data.getWidth(), data.getHeight(),
- data.getPixelFormat(), data.getPixelType(), data.getBuffer());
- }
+ // FIXME: may need check for GLUnsupportedException
+ GLU glu = GLU.createGLU();
+ glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(),
+ data.getWidth(), data.getHeight(),
+ data.getPixelFormat(), data.getPixelType(), data.getBuffer());
} finally {
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, align[0]); // restore alignment
}