]> git.tdb.fi Git - libs/gl.git/blob - source/core/clipping.h
Remove public binding APIs from Renderbuffer and Clipping
[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 <msp/core/attributes.h>
6 #include "programdata.h"
7
8 namespace Msp {
9 namespace GL {
10
11 class ClipPlane;
12 class Matrix;
13
14 class Clipping
15 {
16 private:
17         struct AttachedPlane
18         {
19                 const ClipPlane *plane;
20                 mutable unsigned generation;
21
22                 AttachedPlane(const ClipPlane *p): plane(p), generation(0) { }
23         };
24
25         std::vector<AttachedPlane> planes;
26         mutable ProgramData shdata;
27
28 public:
29         DEPRECATED static unsigned get_n_attach_points();
30
31         void attach(const ClipPlane &);
32         void detach(const ClipPlane &);
33
34         unsigned get_n_planes() const { return planes.size(); }
35
36         DEPRECATED void attach(unsigned, const ClipPlane &p) { attach(p); }
37         DEPRECATED void detach(unsigned);
38
39         const ProgramData &get_shader_data() const;
40 };
41
42 } // namespace GL
43 } // namespace Msp
44
45 #endif