linearTexture = glGenTextures();
glBindTexture( GL_TEXTURE_2D, linearTexture );
for ( int mipmapLevel = 0; mipmapLevel < imageSet.getMipmapCount(); mipmapLevel++ ) {
SingleImage image = imageSet.getImage( mipmapLevel, 0, 0 );
Dimensions imageDimensions = image.getDimensions();
glTexImage2D( GL_TEXTURE_2D, mipmapLevel, GL_SRGB8, imageDimensions.width, imageDimensions.height, 0,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, image.getImageData() );
}
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0 );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, imageSet.getMipmapCount() - 1 );
filePath = Framework.findFileOrThrow( "checker_gamma.dds" );
imageSet = DdsLoader.loadFromFile( filePath );
gammaTexture = glGenTextures();
glBindTexture( GL_TEXTURE_2D, gammaTexture );
for ( int mipmapLevel = 0; mipmapLevel < imageSet.getMipmapCount(); mipmapLevel++ ) {
SingleImage image = imageSet.getImage( mipmapLevel, 0, 0 );
Dimensions imageDimensions = image.getDimensions();
glTexImage2D( GL_TEXTURE_2D, mipmapLevel, GL_SRGB8, imageDimensions.width, imageDimensions.height, 0,
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, image.getImageData() );
}