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-05-31 19:34:17 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-31 20:09:20 +0300
commit494470ba232dafaaff771ac90f773c6771375b50 (patch)
tree709828108070cb596238d045080a081b4c1aa985 /source/blender/gpu/intern/gpu_texture.c
parent8789490f961d9ddda1a2f2f6cb090c64a0ec5728 (diff)
GPUTexture: Expose GPU_texture_create_buffer and add GL_R32I support.
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.c')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 38b38736660..14d0b27bc28 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -203,6 +203,7 @@ static GLenum gpu_texture_get_format(
case GPU_R11F_G11F_B10F:
case GPU_R32F:
case GPU_R32UI:
+ case GPU_R32I:
*bytesize = 4;
break;
case GPU_DEPTH_COMPONENT24:
@@ -237,6 +238,7 @@ static GLenum gpu_texture_get_format(
case GPU_RGBA8: return GL_RGBA8;
case GPU_R32F: return GL_R32F;
case GPU_R32UI: return GL_R32UI;
+ case GPU_R32I: return GL_R32I;
case GPU_R16F: return GL_R16F;
case GPU_R16I: return GL_R16I;
case GPU_R16UI: return GL_R16UI;
@@ -616,7 +618,7 @@ static GPUTexture *GPU_texture_cube_create(
}
/* Special buffer textures. data_type must be compatible with the buffer content. */
-static GPUTexture *GPU_texture_create_buffer(GPUTextureFormat data_type, const GLuint buffer)
+GPUTexture *GPU_texture_create_buffer(GPUTextureFormat data_type, const GLuint buffer)
{
GPUTexture *tex = MEM_callocN(sizeof(GPUTexture), "GPUTexture");
tex->number = -1;