and is only a temporary measure, as it was planned to OSGify the
HUD and put it in the scenegraph etc.)
if ((*it)->isEnabled())
(*it)->draw();
+ _clip_box->unset();
+
if (isAntialiased()) {
glDisable(GL_ALPHA_TEST);
glDisable(GL_LINE_SMOOTH);
glEnable(GL_CLIP_PLANE3);
}
+
+void ClipBox::unset()
+{
+ if (_active) {
+ glDisable(GL_CLIP_PLANE0);
+ glDisable(GL_CLIP_PLANE1);
+ glDisable(GL_CLIP_PLANE2);
+ glDisable(GL_CLIP_PLANE3);
+ }
+}
public:
ClipBox(const SGPropertyNode *, float xoffset = 0, float yoffset = 0);
void set();
+ void unset();
private:
bool _active;
_locStippleLineList.draw();
glDisable(GL_LINE_STIPPLE);
}
- glDisable(GL_CLIP_PLANE0);
- glDisable(GL_CLIP_PLANE1);
- glDisable(GL_CLIP_PLANE2);
+ _clip_box->set();
glPopMatrix();
//*************************************************************