X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Ftechnique.cpp;h=122eaf73d412f8f91f5c6fbf3690d6240cfea057;hb=5008778dbb1840bf7c6d479800d2b932f8386fb2;hp=be51b1dabbc207ae4eb0b80bcd5bf8d81822f6a6;hpb=c4aeeced7b397d46772577775bd3a0d6c4706cba;p=libs%2Fgl.git diff --git a/source/materials/technique.cpp b/source/materials/technique.cpp index be51b1da..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,14 +92,6 @@ 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 string &name) { #ifdef DEBUG