]> git.tdb.fi Git - libs/gl.git/blob - source/technique.h
Allow copying of Uniforms and ProgramData
[libs/gl.git] / source / technique.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef TECHNIQUE_H_
9 #define TECHNIQUE_H_
10
11 #include "objectpass.h"
12
13 namespace Msp {
14 namespace GL {
15
16 class Material;
17 class Tag;
18 class Texture;
19
20 /**
21 */
22 class Technique
23 {
24 public:
25         class Loader: public Msp::DataFile::CollectionObjectLoader<Technique>
26         {
27         public:
28                 Loader(Technique &, Collection &);
29
30         private:
31                 void inherit(const std::string &);
32                 void pass(const std::string &);
33         };
34
35 private:
36         class InheritLoader: public Msp::DataFile::CollectionObjectLoader<Technique>
37         {
38         public:
39                 InheritLoader(Technique &, Collection &);
40         
41         private:
42                 void texture(const std::string &, const std::string &);
43         };
44
45         typedef std::map<Tag, RenderPass> PassMap;
46
47         PassMap passes;
48
49 public:
50         bool has_pass(const GL::Tag &) const;
51         const RenderPass &get_pass(const GL::Tag &) const;
52         const PassMap &get_passes() const { return passes; }
53 };
54
55 } // namespace GL
56 } // namespace Msp
57
58 #endif