diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-02-20 19:01:28 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-02-21 03:33:56 +0300 |
commit | 6fa984a1afaadcfd5d7a630da4c44bdee4676bd5 (patch) | |
tree | 84d3870456de855963a3757dd529a1683f485786 /source/blender/gpu/opengl/gl_texture.hh | |
parent | 1a9fe57a9f6e53e5f34c95441be27296dadefa75 (diff) |
GPU: Add RGB10_A2 format support
Nice format to output high definition normals or normalized colors.
Diffstat (limited to 'source/blender/gpu/opengl/gl_texture.hh')
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh index afe0e0195ce..9da27056269 100644 --- a/source/blender/gpu/opengl/gl_texture.hh +++ b/source/blender/gpu/opengl/gl_texture.hh @@ -158,6 +158,8 @@ inline GLenum to_gl_internal_format(eGPUTextureFormat format) case GPU_R16: return GL_R16; /* Special formats texture & renderbuffer */ + case GPU_RGB10_A2: + return GL_RGB10_A2; case GPU_R11F_G11F_B10F: return GL_R11F_G11F_B10F; case GPU_DEPTH32F_STENCIL8: @@ -280,6 +282,8 @@ inline GLenum to_gl(eGPUDataFormat format) return GL_UNSIGNED_BYTE; case GPU_DATA_UINT_24_8: return GL_UNSIGNED_INT_24_8; + case GPU_DATA_2_10_10_10_REV: + return GL_UNSIGNED_INT_2_10_10_10_REV; case GPU_DATA_10_11_11_REV: return GL_UNSIGNED_INT_10F_11F_11F_REV; default: @@ -333,6 +337,7 @@ inline GLenum to_gl_data_format(eGPUTextureFormat format) case GPU_RGBA16: case GPU_RGBA16F: case GPU_RGBA32F: + case GPU_RGB10_A2: return GL_RGBA; case GPU_DEPTH24_STENCIL8: case GPU_DEPTH32F_STENCIL8: |