]> git.tdb.fi Git - libs/gl.git/blob - source/core/clipplane.h
Use persistent uniform blocks for Camera, Lighting and Clipping
[libs/gl.git] / source / core / clipplane.h
1 #ifndef MSP_GL_CLIP_H_
2 #define MSP_GL_CLIP_H_
3
4 #include "vector.h"
5
6 namespace Msp {
7 namespace GL {
8
9 class Matrix;
10 class ProgramData;
11
12 class ClipPlane
13 {
14 private:
15         Vector4 eq;
16         unsigned generation;
17
18 public:
19         ClipPlane();
20         ClipPlane(const Vector4 &);
21         ClipPlane(const Vector3 &, const Vector3 &);
22
23         void set_equation(const Vector4 &);
24         void set_plane(const Vector3 &, const Vector3 &);
25         void update_shader_data(ProgramData &, unsigned) const;
26
27         unsigned get_generation() const { return generation; }
28 };
29
30 } // namespace GL
31 } // namespace Msp
32
33 #endif