X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fclipping.h;fp=source%2Fcore%2Fclipping.h;h=e42c28e6394b6c1c519afc26f182957b1f75be20;hb=7aaec9a70b8d7733429bec043f8e33e02956f266;hp=0000000000000000000000000000000000000000;hpb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;p=libs%2Fgl.git diff --git a/source/core/clipping.h b/source/core/clipping.h new file mode 100644 index 00000000..e42c28e6 --- /dev/null +++ b/source/core/clipping.h @@ -0,0 +1,35 @@ +#ifndef MSP_GL_CLIPPING_H_ +#define MSP_GL_CLIPPING_H_ + +#include +#include "bindable.h" + +namespace Msp { +namespace GL { + +class ClipPlane; +class Matrix; +class ProgramData; + +class Clipping: public Bindable +{ +private: + std::vector planes; + +public: + static unsigned get_n_attach_points(); + + void attach(unsigned, const ClipPlane &); + void detach(unsigned); + + void update_shader_data(ProgramData &, const Matrix &) const; + + void bind() const; + + static void unbind(); +}; + +} // namespace GL +} // namespace Msp + +#endif