namespace GL {
ClipPlane::ClipPlane():
- eq(0, 0, 0, 1)
+ eq(0, 0, 0, 1),
+ generation(0)
{ }
ClipPlane::ClipPlane(const Vector4 &e):
- eq(e)
+ eq(e),
+ generation(0)
{ }
ClipPlane::ClipPlane(const Vector3 &p, const Vector3 &d):
- eq(compose(d, -dot(p, d)))
+ eq(compose(d, -dot(p, d))),
+ generation(0)
{ }
void ClipPlane::set_equation(const Vector4 &e)
{
eq = e;
+ ++generation;
}
void ClipPlane::set_plane(const Vector3 &p, const Vector3 &d)
set_equation(compose(nd, -dot(p, nd)));
}
-void ClipPlane::update_shader_data(ProgramData &shdata, const Matrix &view_inverse, unsigned i) const
+void ClipPlane::update_shader_data(ProgramData &shdata, unsigned i) const
{
- shdata.uniform(format("clip_planes[%d].equation", i), eq*view_inverse);
+ shdata.uniform(format("clip_planes[%d].equation", i), eq);
}
} // namespace GL