]> git.tdb.fi Git - libs/gl.git/blob - source/clipplane.h
Add a function to set depth clip of EnvironmentMap
[libs/gl.git] / source / 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
17 public:
18         ClipPlane();
19         ClipPlane(const Vector4 &);
20         ClipPlane(const Vector3 &, const Vector3 &);
21
22 private:
23         void update(unsigned) const;
24 public:
25         void set_equation(const Vector4 &);
26         void set_plane(const Vector3 &, const Vector3 &);
27         void update_shader_data(ProgramData &, const Matrix &, unsigned) const;
28
29         void bind_to(unsigned) const;
30
31         static void unbind_from(unsigned);
32 };
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif