From: Steinar H. Gunderson Date: Thu, 30 Jul 2015 11:08:31 +0000 (+0200) Subject: If a shader fails to compile, output it for easier debugging. X-Git-Tag: 1.2.0~38 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=71cf8dc668a86a14ea73c6bc442391996fe247cc;hp=58baca01a920dd4aab103c5797019d95a20f4baa If a shader fails to compile, output it for easier debugging. --- diff --git a/util.cpp b/util.cpp index a6175b4..0a294e6 100644 --- 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); }