namespace Msp {
namespace GL {
-DepthTest::DepthTest():
- write(true),
- pred(LESS)
-{ }
-
-DepthTest::DepthTest(Predicate p, bool w):
- write(w),
- pred(p)
-{ }
-
-void DepthTest::bind() const
-{
- if(set_current(this))
- {
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(get_gl_predicate(pred));
- glDepthMask(write);
- }
-}
-
-const DepthTest &DepthTest::lequal()
-{
- static DepthTest test(LEQUAL);
- return test;
-}
-
-void DepthTest::unbind()
-{
- if(set_current(0))
- {
- glDisable(GL_DEPTH_TEST);
- // Allow glClear(GL_DEPTH_BUFFER_BIT) to work
- glDepthMask(true);
- }
-}
-
-
ScissorTest::ScissorTest():
left(0),
bottom(0),