diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-08-18 15:22:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-08-18 16:07:17 +0300 |
commit | 91ab64f38f354664f714fe2dab0a3a3bff2b7e9e (patch) | |
tree | 122e02c42c5f330325345beafa77ee84f85f3c18 /source/blender/gpu | |
parent | 95b1b7756d6e09b0bcf98c120de2b6552c1848be (diff) |
GPU_texture : Add RG8 format.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 6d6c195c175..83872ccdf80 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -69,6 +69,7 @@ typedef enum GPUTextureFormat { GPU_RG16F, GPU_R32F, GPU_R16F, + GPU_RG8, GPU_R8, #if 0 GPU_RGBA32I, @@ -83,7 +84,6 @@ typedef enum GPUTextureFormat { GPU_RG16, GPU_RG16I, GPU_RG16UI, - GPU_RG8, GPU_RG8I, GPU_RG8UI, GPU_R32I, diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index d7d90a28a8c..959fc7e8794 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -167,6 +167,7 @@ static GLenum gpu_texture_get_format( break; case GPU_DEPTH_COMPONENT16: case GPU_R16F: + case GPU_RG8: *bytesize = 2; break; case GPU_R8: @@ -189,6 +190,7 @@ static GLenum gpu_texture_get_format( case GPU_RGBA8: return GL_RGBA8; case GPU_R32F: return GL_R32F; case GPU_R16F: return GL_R16F; + case GPU_RG8: return GL_RG8; case GPU_R8: return GL_R8; /* Special formats texture & renderbuffer */ case GPU_R11F_G11F_B10F: return GL_R11F_G11F_B10F; |