]> git.tdb.fi Git - libs/gl.git/blobdiff - source/object.cpp
Add a find_pass function to Technique
[libs/gl.git] / source / object.cpp
index 25daf13ec5dd02fba0bdc17ed9fa6511ab360ebd..d4562b86103af8abd34a8dbdcf3c2cf46dd8221e 100644 (file)
@@ -170,9 +170,7 @@ const RenderPass *Object::get_pass(const Tag &tag, unsigned lod) const
        const Technique *tech = lods[lod].technique.get();
        if(!tech)
                throw logic_error("no technique");
-       if(!tech->has_pass(tag))
-               return 0;
-       return &tech->get_pass(tag);
+       return tech->find_pass(tag);
 }
 
 void Object::resource_loaded(Resource &res)