]> git.sesse.net Git - movit/commitdiff
If a shader fails to compile, output it for easier debugging.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 30 Jul 2015 11:08:31 +0000 (13:08 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 30 Jul 2015 11:08:31 +0000 (13:08 +0200)
util.cpp

index a6175b4dbaf81bcad6fe7d9b6b585a4b2a3b76b6..0a294e65ca7a8ab07a77ab1438286038848ea7a2 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -156,6 +156,7 @@ GLuint compile_shader(const string &shader_src, GLenum type)
        GLint status;
        glGetShaderiv(obj, GL_COMPILE_STATUS, &status);
        if (status == GL_FALSE) {
+               fprintf(stderr, "Failed to compile shader: %s\n", shader_src.c_str());
                exit(1);
        }