Fix T80998: DDS Image files are not displayed correctly

Blender 2.91 only. Due to recent refactoring the compressed texture
formats missed the conversion to its GL counterpart.
This commit is contained in:
Jeroen Bakker 2020-09-25 13:10:06 +02:00
parent d587027015
commit 0badb7f82d
Notes: blender-bot 2023-02-14 06:37:09 +01:00
Referenced by issue #80925, DDS Image files are not displayed correctly outside of Cycles/Thumbnails
1 changed files with 12 additions and 0 deletions

View File

@ -349,6 +349,18 @@ inline GLenum to_gl_data_format(eGPUTextureFormat format)
case GPU_DEPTH_COMPONENT24:
case GPU_DEPTH_COMPONENT32F:
return GL_DEPTH_COMPONENT;
case GPU_SRGB8_A8_DXT1:
return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
case GPU_SRGB8_A8_DXT3:
return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
case GPU_SRGB8_A8_DXT5:
return GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
case GPU_RGBA8_DXT1:
return GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
case GPU_RGBA8_DXT3:
return GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
case GPU_RGBA8_DXT5:
return GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
default:
BLI_assert(!"Texture format incorrect or unsupported\n");
return 0;