]> git.tdb.fi Git - libs/gl.git/blob - source/technique.h
Improve interface documentation a bit
[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 Ties multiple tagged render passes together.
15 */
16 class Technique
17 {
18 public:
19         class Loader: public Msp::DataFile::CollectionObjectLoader<Technique>
20         {
21         public:
22                 Loader(Technique &);
23                 Loader(Technique &, Collection &);
24
25         private:
26                 void init();
27                 void inherit(const std::string &);
28                 void pass(const std::string &);
29         };
30
31 private:
32         class InheritLoader: public Msp::DataFile::CollectionObjectLoader<Technique>
33         {
34         public:
35                 InheritLoader(Technique &, Collection &);
36
37         private:
38                 void texture(const std::string &, const std::string &);
39         };
40
41 public:
42         typedef std::map<Tag, RenderPass> PassMap;
43
44 private:
45         PassMap passes;
46
47 public:
48         RenderPass &add_pass(const GL::Tag &);
49         bool has_pass(const GL::Tag &) const;
50         const RenderPass &get_pass(const GL::Tag &) const;
51         const PassMap &get_passes() const { return passes; }
52         bool has_shaders() const;
53 };
54
55 } // namespace GL
56 } // namespace Msp
57
58 #endif