1 #ifndef MSP_GL_TECHNIQUE_H_
2 #define MSP_GL_TECHNIQUE_H_
5 #include "rendermethod.h"
15 Ties multiple tagged render methods together.
20 class Loader: public Msp::DataFile::CollectionObjectLoader<Technique>
23 std::string inline_base_name;
25 static ActionMap shared_actions;
29 Loader(Technique &, Collection &);
31 virtual void init_actions();
34 void set_inline_base_name(const std::string &);
37 void inherit(const std::string &);
38 void method(const std::string &);
42 class InheritLoader: public Msp::DataFile::CollectionObjectLoader<Technique>
45 InheritLoader(Technique &, Collection &);
48 void material(const std::string &, const std::string &);
49 void texture(const std::string &, const std::string &);
53 std::map<Tag, RenderMethod> methods;
56 RenderMethod &add_method(Tag);
57 bool has_method(Tag) const;
58 const RenderMethod &get_method(Tag) const;
59 const RenderMethod *find_method(Tag) const;
60 const std::map<Tag, RenderMethod> &get_methods() const { return methods; }
61 bool replace_texture(const std::string &, const Texture &);
62 bool replace_material(const std::string &, const Material &);
63 bool replace_uniforms(const ProgramData &);
65 void set_debug_name(const std::string &);