]> git.tdb.fi Git - libs/gl.git/blob - source/objectpass.h
Support specifying elements in PrimitiveBuilder
[libs/gl.git] / source / objectpass.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 MSP_GL_OBJECTPASS_H_
9 #define MSP_GL_OBJECTPASS_H_
10
11 #include <msp/datafile/collection.h>
12
13 namespace Msp {
14 namespace GL {
15
16 class Program;
17 class ProgramData;
18
19 struct ObjectPass
20 {
21         class Loader: public DataFile::Loader
22         {
23         public:
24                 typedef DataFile::Collection Collection;
25
26         private:
27                 ObjectPass &pass;
28                 Collection &coll;
29
30         public:
31                 Loader(ObjectPass &, Collection &);
32                 ObjectPass &get_object() const { return pass; }
33                 Collection &get_collection() const { return coll; }
34         private:
35                 void shader(const std::string &);
36         };
37
38         Program *shprog;
39         ProgramData *shdata;
40         bool use_textures;
41
42         ObjectPass();
43         ~ObjectPass();
44 };
45
46 } // namespace GL
47 } // namespace Msp
48
49 #endif