]> git.tdb.fi Git - libs/gl.git/blob - source/technique.h
Drop Id tags and copyright notices from files
[libs/gl.git] / source / technique.h
1 #ifndef TECHNIQUE_H_
2 #define TECHNIQUE_H_
3
4 #include "renderpass.h"
5 #include "tag.h"
6
7 namespace Msp {
8 namespace GL {
9
10 class Material;
11 class Texture;
12
13 /**
14 */
15 class Technique
16 {
17 public:
18         class Loader: public Msp::DataFile::CollectionObjectLoader<Technique>
19         {
20         public:
21                 Loader(Technique &);
22                 Loader(Technique &, Collection &);
23
24         private:
25                 void init();
26                 void inherit(const std::string &);
27                 void pass(const std::string &);
28         };
29
30 private:
31         class InheritLoader: public Msp::DataFile::CollectionObjectLoader<Technique>
32         {
33         public:
34                 InheritLoader(Technique &, Collection &);
35         
36         private:
37                 void texture(const std::string &, const std::string &);
38         };
39
40         typedef std::map<Tag, RenderPass> PassMap;
41
42         PassMap passes;
43
44 public:
45         RenderPass &add_pass(const GL::Tag &);
46         bool has_pass(const GL::Tag &) const;
47         const RenderPass &get_pass(const GL::Tag &) const;
48         const PassMap &get_passes() const { return passes; }
49 };
50
51 } // namespace GL
52 } // namespace Msp
53
54 #endif