1 #ifndef MSP_GL_DEPTHTEST_H_
2 #define MSP_GL_DEPTHTEST_H_
4 #include <msp/datafile/objectloader.h>
11 Tests incoming fragment depth values against the depth buffer. If the test
12 fails, the fragment is discarded.
16 class Loader: public DataFile::ObjectLoader<DepthTest>
22 void compare(Predicate);
26 Predicate compare = LESS;
29 DepthTest() = default;
30 DepthTest(Predicate, bool = true);
32 bool operator==(const DepthTest &) const;
33 bool operator!=(const DepthTest &d) const { return !operator==(d); }
36 inline bool DepthTest::operator==(const DepthTest &other) const
38 return enabled==other.enabled && compare==other.compare && write==other.write;