]> git.tdb.fi Git - libs/gl.git/blob - source/texturing.h
Replace Texturing::Attachment with a simple Texture pointer
[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 public:
18         ~Texturing();
19
20         void attach(unsigned, const Texture &);
21         void detach(unsigned);
22 private:
23         void set_attachment(unsigned, const Texture *);
24         void bind_attachment(unsigned) const;
25
26         static void unbind_attachment(unsigned);
27
28 public:
29         void bind() const;
30
31         static void unbind();
32 };
33
34 } // namespace GL
35 } // namespace Msp;
36
37 #endif