]> git.sesse.net Git - movit/blobdiff - util.cpp
Send shader compile log to stderr instead of stdout.
[movit] / util.cpp
index 6b1de53cc35b52af8094a65a97e442aba43f81f8..3b15c3787d7e82644d6c5633d9ea05387e0efb88 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -2,6 +2,7 @@
 #include <assert.h>
 #include <math.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <Eigen/Core>
 
@@ -98,7 +99,7 @@ GLuint compile_shader(const string &shader_src, GLenum type)
        glGetShaderInfoLog(obj, log_length, &log_length, info_log);
        info_log[log_length] = 0; 
        if (strlen(info_log) > 0) {
-               printf("shader compile log: %s\n", info_log);
+               fprintf(stderr, "Shader compile log: %s\n", info_log);
        }
 
        GLint status;