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:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-22 14:57:35 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-22 14:57:57 +0300
commit0795f62ddfed50d0836ab42849b791b0a0a43a0b (patch)
treec39b8254ac399498d1820952aa7725d1e86b583f /source/blender/gpu/intern/gpu_debug.c
parent5983280b4f5fd41d7441b0141bfd257b9fd32a3e (diff)
GPU debug: Only flush stderr if needed.
Diffstat (limited to 'source/blender/gpu/intern/gpu_debug.c')
-rw-r--r--source/blender/gpu/intern/gpu_debug.c6
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);
}