X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fstenciltest.h;h=2a4338f2012afef716c7f2b91494e32d7abeb7cd;hb=50492d9a5106b3dd76e3d6fa5ac88d9f97ba3c47;hp=09f1d2784e0e0686a71633985febfd0ec069bf6a;hpb=11a5d4f2a35dfdcf61e16d4fcfba22e20ea6a3db;p=libs%2Fgl.git diff --git a/source/core/stenciltest.h b/source/core/stenciltest.h index 09f1d278..2a4338f2 100644 --- a/source/core/stenciltest.h +++ b/source/core/stenciltest.h @@ -43,8 +43,17 @@ struct StencilTest StencilOp depth_fail_op = KEEP; StencilOp depth_pass_op = KEEP; unsigned reference = 0; + + bool operator==(const StencilTest &) const; + bool operator!=(const StencilTest &s) const { return !operator==(s); } }; +inline bool StencilTest::operator==(const StencilTest &other) const +{ + return enabled==other.enabled && compare==other.compare && stencil_fail_op==other.stencil_fail_op && + depth_fail_op==other.depth_fail_op && depth_pass_op==other.depth_pass_op && reference==other.reference; +} + void operator>>(const LexicalConverter &, StencilOp &); void operator<<(LexicalConverter &, StencilOp);