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>2015-10-16 18:46:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-16 18:46:38 +0300
commitd307c24a8bb970541a90afb48934247a3e32d951 (patch)
treea7ffa6cc4c4bc475aaea26e8929737ecd3596ef8 /source/blender
parenta1b34c0d289184b201912f715e730f54943dd4de (diff)
Cleanup: style
Also use gcc style file:line: syntax for errors.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_debug.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/source/blender/gpu/intern/gpu_debug.c b/source/blender/gpu/intern/gpu_debug.c
index 1c194f517aa..29b7ff11586 100644
--- a/source/blender/gpu/intern/gpu_debug.c
+++ b/source/blender/gpu/intern/gpu_debug.c
@@ -43,7 +43,7 @@
#define CASE_CODE_RETURN_STR(code) case code: return #code;
-static const char* gpu_gl_error_symbol(GLenum err)
+static const char *gpu_gl_error_symbol(GLenum err)
{
switch (err) {
CASE_CODE_RETURN_STR(GL_NO_ERROR)
@@ -81,8 +81,8 @@ static bool gpu_report_gl_errors(const char *file, int line, const char *str)
}
else {
/* glGetError should have cleared the error flag, so if we get the
- same flag twice that means glGetError itself probably triggered
- the error. This happens on Windows if the GL context is invalid.
+ * same flag twice that means glGetError itself probably triggered
+ * the error. This happens on Windows if the GL context is invalid.
*/
{
GLenum new_error = glGetError();
@@ -92,22 +92,18 @@ static bool gpu_report_gl_errors(const char *file, int line, const char *str)
}
}
- fprintf(
- stderr,
- "%s(%d): ``%s'' -> GL Error (0x%04X - %s): %s\n",
- file,
- line,
- str,
- gl_error,
- gpu_gl_error_symbol(gl_error),
- gpuErrorString(gl_error));
+ fprintf(stderr,
+ "%s:%d: ``%s'' -> GL Error (0x%04X - %s): %s\n",
+ file, line, str, gl_error,
+ gpu_gl_error_symbol(gl_error),
+ gpuErrorString(gl_error));
return false;
}
}
-const char* gpuErrorString(GLenum err)
+const char *gpuErrorString(GLenum err)
{
switch (err) {
case GL_NO_ERROR:
@@ -208,9 +204,9 @@ void gpu_debug_init(void)
if (GLEW_KHR_debug) {
#ifndef GLEW_ES_ONLY
- glDebugMessageCallback(gpu_debug_proc, mxGetCurrentContext());
- glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_string_marker(sizeof(success), success);
+ glDebugMessageCallback(gpu_debug_proc, mxGetCurrentContext());
+ glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
+ GPU_string_marker(sizeof(success), success);
#endif
return;
}
@@ -324,7 +320,7 @@ void GPU_print_error_debug(const char *str)
}
-void GPU_assert_no_gl_errors(const char* file, int line, const char* str)
+void GPU_assert_no_gl_errors(const char *file, int line, const char *str)
{
if (G.debug) {
GLboolean gl_ok = gpu_report_gl_errors(file, line, str);