Add some check_error() for shaders miscompiling.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 16 Sep 2015 18:02:30 +0000 (20:02 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 16 Sep 2015 18:02:30 +0000 (20:02 +0200)
resource_pool.cpp

index 7f81376..152793c 100644 (file)
@@ -124,8 +124,11 @@ GLuint ResourcePool::compile_glsl_program(const string& vertex_shader, const str
        } else {
                // Not in the cache. Compile the shaders.
                glsl_program_num = glCreateProgram();
+               check_error();
                GLuint vs_obj = compile_shader(vertex_shader, GL_VERTEX_SHADER);
+               check_error();
                GLuint fs_obj = compile_shader(fragment_shader, GL_FRAGMENT_SHADER);
+               check_error();
                glAttachShader(glsl_program_num, vs_obj);
                check_error();
                glAttachShader(glsl_program_num, fs_obj);