X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Ftechnique.cpp;h=122eaf73d412f8f91f5c6fbf3690d6240cfea057;hb=5008778dbb1840bf7c6d479800d2b932f8386fb2;hp=ef1764112c4f3de6b98a2310ce67b84267e34e9d;hpb=e9a898f315b5d1396f196d785913a283c30940f2;p=libs%2Fgl.git diff --git a/source/materials/technique.cpp b/source/materials/technique.cpp index ef176411..122eaf73 100644 --- a/source/materials/technique.cpp +++ b/source/materials/technique.cpp @@ -3,9 +3,7 @@ #include #include #include "material.h" -#include "program.h" #include "programdata.h" -#include "tag.h" #include "technique.h" #include "texture.h" @@ -83,7 +81,7 @@ bool Technique::replace_uniforms(const ProgramData &shdata) if(!new_shdata) new_shdata = new ProgramData(*kvp.second.get_shader_data()); - new_shdata->uniform(tag, shdata.get_uniform(t)); + new_shdata->copy_uniform(shdata, tag); replaced = true; } @@ -94,15 +92,7 @@ bool Technique::replace_uniforms(const ProgramData &shdata) return replaced; } -bool Technique::has_shaders() const -{ - for(const auto &kvp: passes) - if(kvp.second.get_shader_program()) - return true; - return false; -} - -void Technique::set_debug_name(const std::string &name) +void Technique::set_debug_name(const string &name) { #ifdef DEBUG for(auto &kvp: passes)