]> git.tdb.fi Git - libs/gl.git/blobdiff - source/tests.cpp
Rearrange soucre files into subdirectories
[libs/gl.git] / source / tests.cpp
diff --git a/source/tests.cpp b/source/tests.cpp
deleted file mode 100644 (file)
index 8e24bb5..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "tests.h"
-
-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(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),
-       width(1),
-       height(1)
-{ }
-
-ScissorTest::ScissorTest(int l, int b, unsigned w, unsigned h):
-       left(l),
-       bottom(b),
-       width(w),
-       height(h)
-{ }
-
-void ScissorTest::bind() const
-{
-       if(set_current(this))
-       {
-               glEnable(GL_SCISSOR_TEST);
-               glScissor(left, bottom, width, height);
-       }
-}
-
-void ScissorTest::unbind()
-{
-       if(set_current(0))
-               glDisable(GL_SCISSOR_TEST);
-}
-
-} // namespace GL
-} // namespace Msp