6 AlphaTest::AlphaTest():
11 AlphaTest::AlphaTest(Predicate p, float r):
16 void AlphaTest::bind() const
20 glEnable(GL_ALPHA_TEST);
21 glAlphaFunc(pred, ref);
25 void AlphaTest::unbind()
28 glDisable(GL_ALPHA_TEST);
32 DepthTest::DepthTest():
37 DepthTest::DepthTest(Predicate p, bool w):
42 void DepthTest::bind() const
46 glEnable(GL_DEPTH_TEST);
52 const DepthTest &DepthTest::lequal()
54 static DepthTest test(LEQUAL);
58 void DepthTest::unbind()
62 glDisable(GL_DEPTH_TEST);
63 // Allow glClear(GL_DEPTH_BUFFER_BIT) to work
69 ScissorTest::ScissorTest():
76 ScissorTest::ScissorTest(int l, int b, unsigned w, unsigned h):
83 void ScissorTest::bind() const
87 glEnable(GL_SCISSOR_TEST);
88 glScissor(left, bottom, width, height);
92 void ScissorTest::unbind()
95 glDisable(GL_SCISSOR_TEST);