]> git.tdb.fi Git - libs/gl.git/blob - source/clipping.h
Use an explicit material slot name in RenderPass
[libs/gl.git] / source / clipping.h
1 #ifndef MSP_GL_CLIPPING_H_
2 #define MSP_GL_CLIPPING_H_
3
4 #include <vector>
5 #include "bindable.h"
6
7 namespace Msp {
8 namespace GL {
9
10 class ClipPlane;
11 class Matrix;
12 class ProgramData;
13
14 class Clipping: public Bindable<Clipping>
15 {
16 private:
17         std::vector<const ClipPlane *> planes;
18
19         static bool bound_with_legacy;
20
21 public:
22         void attach(unsigned, const ClipPlane &);
23         void detach(unsigned);
24
25         void update_shader_data(ProgramData &, const Matrix &) const;
26
27         void bind(bool legacy = true) const;
28
29         static void unbind();
30 };
31
32 } // namespace GL
33 } // namespace Msp
34
35 #endif