Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-11-30 03:42:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-30 04:02:36 +0300
commite1023014f4d28bd74dc2f44845ed04669b51caa5 (patch)
tree4701df95616a362f5594831c1574e12b5c627aec /source/blender/gpu/intern
parent4c31bed6b462db32bf2c2eabf6af932428a65f25 (diff)
GPUTexture: Add support for GL_R16 texture format
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c2
1 files changed, 2 insertions, 0 deletions
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;