From f7f3b08977490e5ed2da93e46a1fce90a0630cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 13 Mar 2018 22:36:24 +0100 Subject: GPUTexture: Unlock GL_R16I format. --- source/blender/gpu/intern/gpu_texture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/gpu/intern') diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index 651cbda00e8..bd25dd03f13 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -136,7 +136,7 @@ static GLenum gpu_texture_get_format( *is_stencil = false; /* Integer formats */ - if (ELEM(data_type, GPU_RG16I)) { + if (ELEM(data_type, GPU_RG16I, GPU_R16I)) { *data_format = GL_INT; switch (components) { @@ -185,6 +185,7 @@ static GLenum gpu_texture_get_format( break; case GPU_DEPTH_COMPONENT16: case GPU_R16F: + case GPU_R16I: case GPU_RG8: *bytesize = 2; break; @@ -209,6 +210,7 @@ static GLenum gpu_texture_get_format( case GPU_RGBA8: return GL_RGBA8; case GPU_R32F: return GL_R32F; case GPU_R16F: return GL_R16F; + case GPU_R16I: return GL_R16I; case GPU_RG8: return GL_RG8; case GPU_R8: return GL_R8; /* Special formats texture & renderbuffer */ -- cgit v1.2.3