]> git.tdb.fi Git - libs/gl.git/blobdiff - tools/glslcompiler.cpp
Always show shader compiler diagnostics in debug builds
[libs/gl.git] / tools / glslcompiler.cpp
index 4a166ba6d640d0fad01eb8b51c6eff19b2e12a57..24df1f2bbc28f48721542843a321ee814340dd16 100644 (file)
@@ -85,6 +85,9 @@ int GlslCompiler::main()
                try
                {
                        compiler.compile(GL::SL::Compiler::PROGRAM);
+                       string diag = compiler.get_diagnostics();
+                       if(!diag.empty())
+                               IO::print("Diagnostic messages from compiler:\n%s\n", diag);
                }
                catch(const GL::SL::invalid_shader_source &exc)
                {