X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fclipping.h;h=f682dc6459e6b0b1efbc9fab213dafa2c57a6b0e;hb=6065f6622cc275dc0b20baaf7c267e71169d18f3;hp=319a8d98ff765a9cfb4e1c7b3fd57ba825b60b75;hpb=a77629d781eeb789870470c5ebdbd4b691e1b138;p=libs%2Fgl.git diff --git a/source/core/clipping.h b/source/core/clipping.h index 319a8d98..f682dc64 100644 --- a/source/core/clipping.h +++ b/source/core/clipping.h @@ -2,35 +2,34 @@ #define MSP_GL_CLIPPING_H_ #include -#include -#include "bindable.h" +#include "programdata.h" namespace Msp { namespace GL { class ClipPlane; -class Matrix; -class ProgramData; -class Clipping: public Bindable +class Clipping { private: - std::vector planes; + struct AttachedPlane + { + const ClipPlane *plane; + mutable unsigned generation; -public: - static unsigned get_n_attach_points(); + AttachedPlane(const ClipPlane *p): plane(p), generation(0) { } + }; + + std::vector planes; + mutable ProgramData shdata; +public: void attach(const ClipPlane &); void detach(const ClipPlane &); - DEPRECATED void attach(unsigned, const ClipPlane &p) { attach(p); } - DEPRECATED void detach(unsigned); - - void update_shader_data(ProgramData &, const Matrix &) const; - - void bind() const; + unsigned get_n_planes() const { return planes.size(); } - static void unbind(); + const ProgramData &get_shader_data() const; }; } // namespace GL