]> git.tdb.fi Git - libs/gl.git/blob - source/core/clipping.h
Remove remaining deprecated things from the core classes
[libs/gl.git] / source / core / clipping.h
1 #ifndef MSP_GL_CLIPPING_H_
2 #define MSP_GL_CLIPPING_H_
3
4 #include <vector>
5 #include "programdata.h"
6
7 namespace Msp {
8 namespace GL {
9
10 class ClipPlane;
11
12 class Clipping
13 {
14 private:
15         struct AttachedPlane
16         {
17                 const ClipPlane *plane;
18                 mutable unsigned generation;
19
20                 AttachedPlane(const ClipPlane *p): plane(p), generation(0) { }
21         };
22
23         std::vector<AttachedPlane> planes;
24         mutable ProgramData shdata;
25
26 public:
27         void attach(const ClipPlane &);
28         void detach(const ClipPlane &);
29
30         unsigned get_n_planes() const { return planes.size(); }
31
32         const ProgramData &get_shader_data() const;
33 };
34
35 } // namespace GL
36 } // namespace Msp
37
38 #endif