diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-30 03:42:51 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-30 04:02:36 +0300 |
commit | e1023014f4d28bd74dc2f44845ed04669b51caa5 (patch) | |
tree | 4701df95616a362f5594831c1574e12b5c627aec | |
parent | 4c31bed6b462db32bf2c2eabf6af932428a65f25 (diff) |
GPUTexture: Add support for GL_R16 texture format
-rw-r--r-- | source/blender/draw/intern/draw_manager_texture.c | 1 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c index 607b5e19745..36882a87408 100644 --- a/source/blender/draw/intern/draw_manager_texture.c +++ b/source/blender/draw/intern/draw_manager_texture.c @@ -36,6 +36,7 @@ static bool drw_texture_format_supports_framebuffer(GPUTextureFormat format) case GPU_R16F: case GPU_R16I: case GPU_R16UI: + case GPU_R16: case GPU_R32F: case GPU_R32UI: case GPU_RG8: diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 4641bde74b9..d5b33b88350 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -324,6 +324,7 @@ static uint gpu_get_bytesize(GPUTextureFormat data_type) case GPU_R16UI: case GPU_R16I: case GPU_RG8: + case GPU_R16: return 2; case GPU_R8: return 1; @@ -357,6 +358,7 @@ static GLenum gpu_get_gl_internalformat(GPUTextureFormat format) case GPU_R16UI: return GL_R16UI; case GPU_RG8: return GL_RG8; case GPU_RG16UI: return GL_RG16UI; + case GPU_R16: return GL_R16; case GPU_R8: return GL_R8; /* Special formats texture & renderbuffer */ case GPU_R11F_G11F_B10F: return GL_R11F_G11F_B10F; |