Browse Source

GL: properly use sRGB PixelFormat for sRGB ETC compressed formats.

pull/370/head
Vladimír Vondruš 7 years ago
parent
commit
65ea1eb91a
  1. 10
      src/Magnum/GL/AbstractTexture.cpp

10
src/Magnum/GL/AbstractTexture.cpp

@ -678,7 +678,6 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) {
#endif
#ifndef MAGNUM_TARGET_GLES2
case TextureFormat::CompressedRGB8Etc2:
case TextureFormat::CompressedSRGB8Etc2:
#endif
case TextureFormat::CompressedRGBS3tcDxt1:
#ifdef MAGNUM_TARGET_GLES
@ -693,6 +692,9 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) {
#ifndef MAGNUM_TARGET_GLES2
case TextureFormat::SRGB8:
#endif
#ifndef MAGNUM_TARGET_GLES2
case TextureFormat::CompressedSRGB8Etc2:
#endif
case TextureFormat::CompressedSRGBS3tcDxt1:
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
case TextureFormat::CompressedSRGBPvrtc2bppV1:
@ -748,9 +750,7 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) {
#endif
#ifndef MAGNUM_TARGET_GLES2
case TextureFormat::CompressedRGB8PunchthroughAlpha1Etc2:
case TextureFormat::CompressedSRGB8PunchthroughAlpha1Etc2:
case TextureFormat::CompressedRGBA8Etc2Eac:
case TextureFormat::CompressedSRGB8Alpha8Etc2Eac:
#endif
case TextureFormat::CompressedRGBAS3tcDxt1:
case TextureFormat::CompressedRGBAS3tcDxt3:
@ -784,6 +784,10 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) {
#if !defined(MAGNUM_TARGET_GLES2) || defined(MAGNUM_TARGET_WEBGL)
case TextureFormat::CompressedSRGBAlphaBptcUnorm:
#endif
#ifndef MAGNUM_TARGET_GLES2
case TextureFormat::CompressedSRGB8PunchthroughAlpha1Etc2:
case TextureFormat::CompressedSRGB8Alpha8Etc2Eac:
#endif
case TextureFormat::CompressedSRGBAlphaS3tcDxt1:
case TextureFormat::CompressedSRGBAlphaS3tcDxt3:
case TextureFormat::CompressedSRGBAlphaS3tcDxt5:

Loading…
Cancel
Save