]> git.tdb.fi Git - libs/gl.git/blobdiff - source/technique.cpp
Add a find_pass function to Technique
[libs/gl.git] / source / technique.cpp
index d6ec7115f6e703a5b215803952a27716f934e468..e3233eff87cc5c6c7ba15550605b709ee4b55ad4 100644 (file)
@@ -28,6 +28,12 @@ const RenderPass &Technique::get_pass(const Tag &tag) const
        return get_item(passes, tag);
 }
 
+const RenderPass *Technique::find_pass(const Tag &tag) const
+{
+       PassMap::const_iterator i = passes.find(tag);
+       return (i!=passes.end() ? &i->second : 0);
+}
+
 bool Technique::replace_texture(const string &slot, const Texture &tex)
 {
        bool replaced = false;