]> git.tdb.fi Git - libs/gl.git/blob - source/texturing.h
Appease the compiler with some extra copy-ctor's and operator='s
[libs/gl.git] / source / texturing.h
1 #ifndef MSP_GL_TEXTURING_H_
2 #define MSP_GL_TEXTURING_H_
3
4 #include <vector>
5 #include "bindable.h"
6
7 namespace Msp {
8 namespace GL {
9
10 class Texture;
11
12 class Texturing: public Bindable<Texturing>
13 {
14 private:
15         std::vector<const Texture *> attachments;
16
17         static bool legacy_used;
18
19 public:
20         ~Texturing();
21
22         void attach(unsigned, const Texture &);
23         void detach(unsigned);
24 private:
25         void set_attachment(unsigned, const Texture *);
26 public:
27         const Texture *get_attached_texture(unsigned) const;
28
29 private:
30         void bind_attachment(unsigned, bool) const;
31
32         static void unbind_attachment(unsigned);
33
34 public:
35         void bind(bool = true) const;
36
37         static void unbind();
38 };
39
40 } // namespace GL
41 } // namespace Msp;
42
43 #endif