diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-28 13:48:16 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-30 13:25:20 +0300 |
commit | 201952aed23b0e4fc93b93f2145621ffd2d86b0d (patch) | |
tree | b60f22f4bbd06b0664aa5f2e943e1f7db8732713 /source | |
parent | 3bc0cb08b82b9b3de7c0e6d66317f501922b0390 (diff) |
GPUTexture: Add support for GL_RGBA16 texture format.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 9bd4bbd89e9..38b38736660 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -187,6 +187,7 @@ static GLenum gpu_texture_get_format( break; case GPU_RG32F: case GPU_RGBA16F: + case GPU_RGBA16: *bytesize = 16; break; case GPU_RGB16F: @@ -227,6 +228,7 @@ static GLenum gpu_texture_get_format( /* Formats texture & renderbuffer */ case GPU_RGBA32F: return GL_RGBA32F; case GPU_RGBA16F: return GL_RGBA16F; + case GPU_RGBA16: return GL_RGBA16; case GPU_RG32F: return GL_RG32F; case GPU_RGB16F: return GL_RGB16F; case GPU_RG16F: return GL_RG16F; @@ -263,6 +265,7 @@ static int gpu_texture_get_component_count(GPUTextureFormat format) switch (format) { case GPU_RGBA8: case GPU_RGBA16F: + case GPU_RGBA16: case GPU_RGBA32F: return 4; case GPU_RGB16F: |