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 a6175b4..0a294e6 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);
        }