]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/technique.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / materials / technique.h
index 762b98f4f9afe1d977e4c663397617c6d6d2205f..716c57cd0bb5903c71d778038a0eb6ac86248e77 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef MSP_GL_TECHNIQUE_H_
 #define MSP_GL_TECHNIQUE_H_
 
-#include "renderpass.h"
+#include <map>
+#include "rendermethod.h"
 #include "tag.h"
 
 namespace Msp {
@@ -11,21 +12,29 @@ class Material;
 class Texture;
 
 /**
-Ties multiple tagged render passes together.
+Ties multiple tagged render methods together.
 */
 class Technique
 {
 public:
        class Loader: public Msp::DataFile::CollectionObjectLoader<Technique>
        {
+       private:
+               std::string inline_base_name;
+
+               static ActionMap shared_actions;
+
        public:
-               Loader(Technique &);
                Loader(Technique &, Collection &);
+       private:
+               virtual void init_actions();
+
+       public:
+               void set_inline_base_name(const std::string &);
 
        private:
-               void init();
                void inherit(const std::string &);
-               void pass(const std::string &);
+               void method(const std::string &);
        };
 
 private:
@@ -40,22 +49,19 @@ private:
                void uniforms();
        };
 
-public:
-       typedef std::map<Tag, RenderPass> PassMap;
-
-private:
-       PassMap passes;
+       std::map<Tag, RenderMethod> methods;
 
 public:
-       RenderPass &add_pass(const Tag &);
-       bool has_pass(const Tag &) const;
-       const RenderPass &get_pass(const Tag &) const;
-       const RenderPass *find_pass(const Tag &) const;
-       const PassMap &get_passes() const { return passes; }
+       RenderMethod &add_method(Tag);
+       bool has_method(Tag) const;
+       const RenderMethod &get_method(Tag) const;
+       const RenderMethod *find_method(Tag) const;
+       const std::map<Tag, RenderMethod> &get_methods() const { return methods; }
        bool replace_texture(const std::string &, const Texture &);
        bool replace_material(const std::string &, const Material &);
        bool replace_uniforms(const ProgramData &);
-       bool has_shaders() const;
+
+       void set_debug_name(const std::string &);
 };
 
 } // namespace GL