]> git.tdb.fi Git - libs/gl.git/blob - source/materials/unlitmaterial.h
Add push_back_nocopy to NodeContainer for clarity
[libs/gl.git] / source / materials / unlitmaterial.h
1 #ifndef MSP_GL_UNLITMATERIAL_H_
2 #define MSP_GL_UNLITMATERIAL_H_
3
4 #include "material.h"
5
6 namespace Msp {
7 namespace GL {
8
9 class UnlitMaterial: public Material
10 {
11 public:
12         class Loader: public DataFile::DerivedObjectLoader<UnlitMaterial, Material::PropertyLoader<UnlitMaterial> >
13         {
14         private:
15                 static ActionMap shared_actions;
16
17         public:
18                 Loader(UnlitMaterial &);
19                 Loader(UnlitMaterial &, Collection &);
20
21         private:
22                 virtual void init_actions();
23
24                 void texture(const std::string &);
25         };
26
27 private:
28         const Texture *texture;
29         Color tint;
30         bool vertex_color;
31
32 public:
33         UnlitMaterial();
34
35 protected:
36         virtual void fill_program_info(std::string &, std::map<std::string, int> &) const;
37
38 public:
39         virtual void attach_textures_to(Texturing &, ProgramData &) const;
40
41         void set_texture(const Texture *);
42         void set_tint(const Color &);
43         void set_vertex_color(bool);
44 };
45
46 } // namespace GL
47 } // namespace Msp
48
49 #endif