]> git.tdb.fi Git - libs/gl.git/blob - source/core/depthtest.h
Set array and matrix strides for default-block uniforms
[libs/gl.git] / source / core / depthtest.h
1 #ifndef MSP_GL_DEPTHTEST_H_
2 #define MSP_GL_DEPTHTEST_H_
3
4 #include <msp/datafile/objectloader.h>
5 #include "predicate.h"
6
7 namespace Msp {
8 namespace GL {
9
10 /**
11 Tests incoming fragment depth values against the depth buffer.  If the test
12 fails, the fragment is discarded.
13 */
14 struct DepthTest
15 {
16         class Loader: public DataFile::ObjectLoader<DepthTest>
17         {
18         public:
19                 Loader(DepthTest &);
20
21         private:
22                 void compare(Predicate);
23         };
24
25         bool enabled;
26         Predicate compare;
27         bool write;
28
29         DepthTest();
30         DepthTest(Predicate, bool = true);
31 };
32
33 } // namespace GL
34 } // namespace Msp
35
36 #endif