X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fdepthtest.h;h=76602269a137848fc7a3b5cc6f84199c28d6358e;hp=d79f06e8d292f4bc39660dd03016dd9d9d0d6694;hb=HEAD;hpb=2b2676392aff2eb6b38c3e463cc67f4d67a4ef8b diff --git a/source/core/depthtest.h b/source/core/depthtest.h index d79f06e8..76602269 100644 --- a/source/core/depthtest.h +++ b/source/core/depthtest.h @@ -22,14 +22,22 @@ struct DepthTest void compare(Predicate); }; - bool enabled; - Predicate compare; - bool write; + bool enabled = false; + Predicate compare = LESS; + bool write = true; - DepthTest(); + DepthTest() = default; DepthTest(Predicate, bool = true); + + bool operator==(const DepthTest &) const; + bool operator!=(const DepthTest &d) const { return !operator==(d); } }; +inline bool DepthTest::operator==(const DepthTest &other) const +{ + return enabled==other.enabled && compare==other.compare && write==other.write; +} + } // namespace GL } // namespace Msp