data.position(pos);
data.limit(pos + mipSizes[m]);
if (texture.getTextureStoreFormat().isCompressed()) {
gl.glCompressedTexImage2D(getGLCubeMapFace(face), m,
JoglTextureUtil.getGLInternalFormat(texture.getTextureStoreFormat()),
width, height, hasBorder ? 1 : 0, mipSizes[m], data);
} else {
gl.glTexImage2D(getGLCubeMapFace(face), m,
JoglTextureUtil.getGLInternalFormat(texture.getTextureStoreFormat()),