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:
authorDalai Felinto <dfelinto@gmail.com>2014-12-03 22:26:43 +0300
committerDalai Felinto <dfelinto@gmail.com>2014-12-03 22:56:20 +0300
commit409043c69dc456fc79f98cc2005ae1b08f6c1719 (patch)
treec813b4bc99178dd1a32acaee88fad4c9904d06bf
parenta6bb564c99a29f9bf81a7b6a60e41808cf231faf (diff)
GPU: code cleanup, no fundamental changes
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 078133789c8..a65b916bd01 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -268,7 +268,7 @@ int GPU_print_error(const char *str)
{
GLenum errCode;
- if (G.debug & G_DEBUG) {
+ if ((G.debug & G_DEBUG)) {
if ((errCode = glGetError()) != GL_NO_ERROR) {
fprintf(stderr, "%s opengl error: %s\n", str, gluErrorString(errCode));
return 1;
@@ -748,8 +748,8 @@ void GPU_texture_bind(GPUTexture *tex, int number)
return;
}
- if (tex->fb) {
- if (tex->fb->object == GG.currentfb && (G.debug & G_DEBUG)) {
+ if ((G.debug & G_DEBUG)) {
+ if (tex->fb && tex->fb->object == GG.currentfb) {
fprintf(stderr, "Feedback loop warning!: Attempting to bind texture attached to current framebuffer!\n");
}
}
@@ -884,8 +884,10 @@ int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, int slot
return 0;
}
- if (tex->number != -1 && (G.debug & G_DEBUG)) {
- fprintf(stderr, "Feedback loop warning!: Attempting to attach texture to framebuffer while still bound to texture unit for drawing!");
+ if ((G.debug & G_DEBUG)) {
+ if (tex->number != -1) {
+ fprintf(stderr, "Feedback loop warning!: Attempting to attach texture to framebuffer while still bound to texture unit for drawing!");
+ }
}
if (tex->depth)
@@ -1252,8 +1254,8 @@ static void shader_print_errors(const char *task, char *log, const char **code,
for (i = 0; i < totcode; i++) {
const char *c, *pos, *end = code[i] + strlen(code[i]);
int line = 1;
-
- if (G.debug & G_DEBUG) {
+
+ if ((G.debug & G_DEBUG)) {
fprintf(stderr, "===== shader string %d ====\n", i + 1);
c = code[i];