X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftechnique.cpp;h=fcb2ffe58358c1ca65d57498a8050fb2c8e27cb6;hb=7b956c7f992e37dddd279df0382c2fb94864cb73;hp=b809abdebb69fdcf4d1a015473285713d5c297f6;hpb=97e1aa9b5d2bacd3f1dddf2d1889f2714e36b766;p=libs%2Fgl.git diff --git a/source/technique.cpp b/source/technique.cpp index b809abde..fcb2ffe5 100644 --- a/source/technique.cpp +++ b/source/technique.cpp @@ -49,7 +49,7 @@ void Technique::Loader::init() void Technique::Loader::inherit(const string &n) { - obj.passes = get_collection().get(n)->get_passes(); + obj.passes = get_collection().get(n).get_passes(); InheritLoader ldr(obj, get_collection()); load_sub_with(ldr); } @@ -74,13 +74,13 @@ Technique::InheritLoader::InheritLoader(Technique &t, Collection &c): void Technique::InheritLoader::texture(const std::string &slot, const string &name) { - Texture *tex = get_collection().get(name); + Texture &tex = get_collection().get(name); for(PassMap::iterator i=obj.passes.begin(); i!=obj.passes.end(); ++i) { int index = i->second.get_texture_index(slot); if(index<0) continue; - i->second.set_texture(index, tex); + i->second.set_texture(index, &tex); } }