texStorageBase(GL_TEXTURE_2D, forceConvertBits, imageSet.getDimensions(),
numMipmaps, internalFormat, upload, textureName);
for (int mipmapLevel = 0; mipmapLevel < numMipmaps; mipmapLevel++) {
Dimensions imageDimensions = imageSet.getDimensions(mipmapLevel);
ByteBuffer imageDataBuffer = imageSet.getImageData(mipmapLevel, 0, 0);
texSubImage(textureName, GL_TEXTURE_2D, mipmapLevel, internalFormat, imageDimensions, upload,
imageDataBuffer, imageSet.getSize(mipmapLevel));
}