X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=util.cpp;h=9eaa262734f284b53aebba1d1c2672538dcc3aee;hp=1c47e11787a8c9781d662334430a2220aef47bf0;hb=0de0202b22a6349d0f9c838947a96eef8155ac90;hpb=243f8ea98271c0680a8e99e4465ac0075e55e3a5 diff --git a/util.cpp b/util.cpp index 1c47e11..9eaa262 100644 --- a/util.cpp +++ b/util.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -88,7 +89,9 @@ GLuint compile_shader(const std::string &shader_src, GLenum type) GLsizei log_length = sizeof(info_log) - 1; glGetShaderInfoLog(obj, log_length, &log_length, info_log); info_log[log_length] = 0; - printf("shader compile log: %s\n", info_log); + if (strlen(info_log) > 0) { + printf("shader compile log: %s\n", info_log); + } GLint status; glGetShaderiv(obj, GL_COMPILE_STATUS, &status);