} else if (texture.getMinificationFilter().usesMipMapLevels()) {
max = mipSizes.length;
}
// set max mip level
gl.glTexParameteri(getGLCubeMapFace(face), GL2GL3.GL_TEXTURE_MAX_LEVEL, max - 1);
for (int m = 0; m < max; m++) {
final int width = Math.max(1, image.getWidth() >> m);
final int height = Math.max(1, image.getHeight() >> m);