]> git.tdb.fi Git - libs/gl.git/blob - source/texturing.h
Remove a number of rarely used legacy features
[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         struct Attachment
16         {
17                 const Texture *tex;
18
19                 Attachment();
20         };
21
22         std::vector<Attachment> attachments;
23
24 public:
25         ~Texturing();
26
27         void attach(unsigned, const Texture &);
28         void detach(unsigned);
29 private:
30         void set_attachment(unsigned, const Texture *);
31         void bind_attachment(unsigned) const;
32
33         static void unbind_attachment(unsigned);
34
35 public:
36         void bind() const;
37
38         static void unbind();
39 };
40
41 } // namespace GL
42 } // namespace Msp;
43
44 #endif