X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fprogram.cpp;h=6013e7e82e9f35656f6741bb3743ea25a0237f5b;hb=0757f7d3e514836ca85954708c41a1accac0574b;hp=4707f4c0416e2be185441efebe847e65ed49fd7a;hpb=f82ef715f0d7e1e7d0b93be4b7b89c8ce6bba40b;p=libs%2Fgl.git diff --git a/source/core/program.cpp b/source/core/program.cpp index 4707f4c0..6013e7e8 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -17,6 +17,8 @@ void Program::add_stages(const Module &mod, const map &spec_values) if(has_stages()) throw invalid_operation("Program::add_stages"); + reflect_data = ReflectData(); + TransientData transient; switch(mod.get_format()) { @@ -30,17 +32,9 @@ void Program::add_stages(const Module &mod, const map &spec_values) throw invalid_argument("Program::add_stages"); } - reflect_data = ReflectData(); - - finalize(mod); + finalize(mod, transient); - if(mod.get_format()==Module::GLSL) - { - query_uniforms(); - query_attributes(); - apply_bindings(transient); - } - else if(mod.get_format()==Module::SPIR_V) + if(mod.get_format()==Module::SPIR_V) { collect_uniforms(static_cast(mod), transient.spec_values); collect_attributes(static_cast(mod));