diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-09-25 14:10:06 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-09-25 14:11:44 +0300 |
commit | 0badb7f82dd4944301983a72ea540f959a393a34 (patch) | |
tree | e70a2d19766a1f3359bcf61d6506d2ed98ffd137 /source/blender/gpu | |
parent | d5870270151920a04cd69bbe4a78f118be09baef (diff) |
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.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.hh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh index 02e9bee3475..e686a7defca 100644 --- a/source/blender/gpu/opengl/gl_texture.hh +++ b/source/blender/gpu/opengl/gl_texture.hh @@ -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; |