]> git.tdb.fi Git - libs/gl.git/blobdiff - source/technique.cpp
Add a function to query if a Technique has any shaders
[libs/gl.git] / source / technique.cpp
index fcb2ffe58358c1ca65d57498a8050fb2c8e27cb6..aa27d99cc7857118888fced1d59e1647347c2abf 100644 (file)
@@ -28,6 +28,14 @@ const RenderPass &Technique::get_pass(const GL::Tag &tag) const
        return get_item(passes, tag);
 }
 
+bool Technique::has_shaders() const
+{
+       for(PassMap::const_iterator i=passes.begin(); i!=passes.end(); ++i)
+               if(i->second.get_shader_program())
+                       return true;
+       return false;
+}
+
 
 Technique::Loader::Loader(Technique &t):
        DataFile::CollectionObjectLoader<Technique>(t, 0)