[Bf-blender-cvs] [0badb7f82dd] master: Fix T80998: DDS Image files are not displayed correctly

Jeroen Bakker noreply at git.blender.org
Fri Sep 25 13:11:46 CEST 2020


Commit: 0badb7f82dd4944301983a72ea540f959a393a34
Author: Jeroen Bakker
Date:   Fri Sep 25 13:10:06 2020 +0200
Branches: master
https://developer.blender.org/rB0badb7f82dd4944301983a72ea540f959a393a34

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.

===================================================================

M	source/blender/gpu/opengl/gl_texture.hh

===================================================================

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;



More information about the Bf-blender-cvs mailing list