diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-22 14:57:35 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-22 14:57:57 +0300 |
commit | 0795f62ddfed50d0836ab42849b791b0a0a43a0b (patch) | |
tree | c39b8254ac399498d1820952aa7725d1e86b583f /source | |
parent | 5983280b4f5fd41d7441b0141bfd257b9fd32a3e (diff) |
GPU debug: Only flush stderr if needed.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_debug.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_debug.c b/source/blender/gpu/intern/gpu_debug.c index b9a22882133..15fe6edb2de 100644 --- a/source/blender/gpu/intern/gpu_debug.c +++ b/source/blender/gpu/intern/gpu_debug.c @@ -167,12 +167,14 @@ static void APIENTRY gpu_debug_proc(GLenum source, GLenum type, GLuint UNUSED(id GLenum UNUSED(severity), GLsizei UNUSED(length), const GLchar *message, GLvoid *UNUSED(userParm)) { - if (source == GL_DEBUG_SOURCE_API && type == GL_DEBUG_TYPE_ERROR) + if (source == GL_DEBUG_SOURCE_API && type == GL_DEBUG_TYPE_ERROR) { fprintf(stderr, "GL: %s\n", message); + fflush(stderr); + } else if (G.debug_value == 20) { fprintf(stderr, "GL: %s\n", message); + fflush(stderr); } - fflush(stderr); } |