X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fprogram.cpp;h=7fff5859c1240ca724f8536f1d72e1e59e1511da;hb=68b74ce23dd20822b07d79dc25aa0a0a19ef27a5;hp=9ef5d6d7eebbf4eef2173b0b33abaec28379c37e;hpb=0912a8d73043961ab7a4d66cd2fbb13187483ffd;p=libs%2Fgl.git diff --git a/source/core/program.cpp b/source/core/program.cpp index 9ef5d6d7..7fff5859 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -86,6 +86,11 @@ void Program::add_stages(const Module &mod, const map &spec_values) compiler.set_source(module->get_prepared_source(), ""); compiler.specialize(spec_values); compiler.compile(SL::Compiler::PROGRAM); +#ifdef DEBUG + string diagnostics = compiler.get_diagnostics(); + if(!diagnostics.empty()) + IO::print("Program diagnostics:\n%s\n", diagnostics); +#endif vector stages = compiler.get_stages(); for(vector::const_iterator i=stages.begin(); i!=stages.end(); ++i) @@ -166,9 +171,9 @@ void Program::bind_attribute(unsigned index, const string &name) glBindAttribLocation(id, index, name.c_str()); } -void Program::bind_attribute(VertexComponent comp, const string &name) +void Program::bind_attribute(VertexAttribute attr, const string &name) { - bind_attribute(get_component_type(comp), name); + bind_attribute(get_attribute_semantic(attr), name); } void Program::bind_fragment_data(unsigned index, const string &name)