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:
authorCampbell Barton <ideasman42@gmail.com>2013-06-13 15:59:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-13 15:59:28 +0400
commitcda5770160e11c2d3c7ab7d20e24a7a8f3b28f1f (patch)
tree5ba33f204de8e68c8d81a5a27b9762f3fb684991 /source/blender/gpu
parenteb136fcbec33288411838dae8105fa17dc8ffecd (diff)
code cleanup: also fix crash in GPU_state_print(). and confine to debug mode builds.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c7
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index e72b5bd8961..a96796b95a3 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1794,17 +1794,18 @@ void GPU_state_init(void)
// glDisable(GL_MULTISAMPLE);
}
+#ifdef DEBUG
/* debugging aid */
static void gpu_get_print(const char *name, GLenum type)
{
- float value[16];
+ float value[32];
int a;
memset(value, 0, sizeof(value));
glGetFloatv(type, value);
printf("%s: ", name);
- for (a=0; a<16; a++)
+ for (a = 0; a < 32; a++)
printf("%.2f ", value[a]);
printf("\n");
}
@@ -2156,4 +2157,4 @@ void GPU_state_print(void)
gpu_get_print("GL_ZOOM_X", GL_ZOOM_X);
gpu_get_print("GL_ZOOM_Y", GL_ZOOM_Y);
}
-
+#endif
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 75041055c41..ffd3bba5493 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -1159,9 +1159,9 @@ static const char *gpu_shader_standard_defines(void)
/* some useful defines to detect GPU type */
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY))
return "#define GPU_ATI\n";
- else if(GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY))
+ else if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY))
return "#define GPU_NVIDIA\n";
- else if(GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY))
+ else if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY))
return "#define GPU_INTEL\n";
return "";