]> git.tdb.fi Git - libs/gl.git/blob - source/core/depthtest.cpp
Use default member initializers for simple types
[libs/gl.git] / source / core / depthtest.cpp
1 #include "depthtest.h"
2
3 using namespace std;
4
5 namespace Msp {
6 namespace GL {
7
8 DepthTest::DepthTest(Predicate c, bool w):
9         enabled(true),
10         compare(c),
11         write(w)
12 { }
13
14
15 DepthTest::Loader::Loader(DepthTest &dt):
16         ObjectLoader<DepthTest>(dt)
17 {
18         add("compare", &Loader::compare);
19         add("write", &DepthTest::write);
20 }
21
22 void DepthTest::Loader::compare(Predicate c)
23 {
24         obj.enabled = true;
25         obj.compare = c;
26 }
27
28 } // namespace GL
29 } // namespace Msp