diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-05-09 22:49:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-05-10 00:55:19 +0300 |
commit | 306603ae76eddf51a6b534101636993a01e21591 (patch) | |
tree | acd7c2abc69a50413a7e07ad85db9f67cc1588f2 /source/blender/gpu | |
parent | 6dc8368b8ffba6ddeda6b49c218b8a1a25178b2f (diff) |
GPUTexture: Add support for 32bit textures.
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 | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 3cd64eb5255..8cf9806ae36 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -62,6 +62,7 @@ typedef struct GPUTexture GPUTexture; * specification. */ typedef enum GPUTextureFormat { /* Formats texture & renderbuffer */ + GPU_RGBA32F, GPU_RGBA16F, GPU_RGBA8, GPU_RG32F, @@ -69,7 +70,6 @@ typedef enum GPUTextureFormat { GPU_R16F, GPU_R8, #if 0 - GPU_RGBA32F, GPU_RGBA32I, GPU_RGBA32UI, GPU_RGBA16, diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 6e7fec1942b..3bda41eaff6 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -143,6 +143,9 @@ static GLenum gpu_texture_get_format( } switch (data_type) { + case GPU_RGBA32F: + *bytesize = 32; + break; case GPU_RG32F: case GPU_RGBA16F: *bytesize = 16; @@ -175,6 +178,7 @@ static GLenum gpu_texture_get_format( * For available types see GPU_texture.h */ switch (data_type) { /* Formats texture & renderbuffer */ + case GPU_RGBA32F: return GL_RGBA32F; case GPU_RGBA16F: return GL_RGBA16F; case GPU_RG32F: return GL_RG32F; case GPU_RGB16F: return GL_RGB16F; |