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:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-03-24 18:33:13 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-03-24 18:33:31 +0300
commit266d243d8d443f4d209b5a4f84362425abd4b403 (patch)
tree24de23fbc0a939c007430059d8895ad7ac246477 /source/blender/gpu/intern/gpu_texture.c
parentd5c177bc90434f8af5bc4a5cadda9cf02737882f (diff)
Cleanup: Silence warnings
``` ...\gpu_texture.c(466,7): warning C4555: result of expression not used ...\gpu_texture.c(559,7): warning C4555: result of expression not used ...\gpu_texture.c:1205:72: warning: pointer targets in passing argument 4 of ‘glGetTexLevelParameteriv’ differ in signedness [-Wpointer-sign] ```
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.c')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index a2afac0580e..075a8e8aeb5 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -463,7 +463,7 @@ static GLenum gpu_format_to_gl_internalformat(eGPUTextureFormat format)
case GPU_R8UI:
return GL_R8UI;
case GPU_R8I:
- GL_R8I;
+ return GL_R8I;
case GPU_R8:
return GL_R8;
case GPU_R32UI:
@@ -507,7 +507,7 @@ static GLenum gpu_format_to_gl_internalformat(eGPUTextureFormat format)
}
}
-static eGPUTextureFormat gl_internalformat_to_gpu_format(const GLenum glformat)
+static eGPUTextureFormat gl_internalformat_to_gpu_format(const GLint glformat)
{
/* You can add any of the available type to this list
* For available types see GPU_texture.h */
@@ -556,7 +556,7 @@ static eGPUTextureFormat gl_internalformat_to_gpu_format(const GLenum glformat)
case GL_R8UI:
return GPU_R8UI;
case GL_R8I:
- GPU_R8I;
+ return GPU_R8I;
case GL_R8:
return GPU_R8;
case GL_R32UI:
@@ -596,8 +596,8 @@ static eGPUTextureFormat gl_internalformat_to_gpu_format(const GLenum glformat)
return GPU_DEPTH_COMPONENT16;
default:
BLI_assert(!"Internal format incorrect or unsupported\n");
- return -1;
}
+ return -1;
}
static GLenum gpu_get_gl_datatype(eGPUDataFormat format)
@@ -1195,8 +1195,8 @@ GPUTexture *GPU_texture_from_bindcode(int textarget, int bindcode)
GPU_print_error_debug("Blender Texture Not Loaded");
}
else {
- GLint w, h;
- GLenum gettarget, gl_format;
+ GLint w, h, gl_format;
+ GLenum gettarget;
gettarget = (textarget == GL_TEXTURE_CUBE_MAP) ? GL_TEXTURE_CUBE_MAP_POSITIVE_X : textarget;
glBindTexture(textarget, tex->bindcode);