diff --git a/samples/Cpp/TestCpp/Classes/ClippingNodeTest/ClippingNodeTest.cpp b/samples/Cpp/TestCpp/Classes/ClippingNodeTest/ClippingNodeTest.cpp index dc709aaeca..5b3bda69e9 100644 --- a/samples/Cpp/TestCpp/Classes/ClippingNodeTest/ClippingNodeTest.cpp +++ b/samples/Cpp/TestCpp/Classes/ClippingNodeTest/ClippingNodeTest.cpp @@ -663,8 +663,7 @@ void RawStencilBufferTest::setupStencilForClippingOnPlane(GLint plane) void RawStencilBufferTest::setupStencilForDrawingOnPlane(GLint plane) { GLint planeMask = 0x1 << plane; - GLint equalOrLessPlanesMask = planeMask | (planeMask - 1); - glStencilFunc(GL_EQUAL, equalOrLessPlanesMask, equalOrLessPlanesMask); + glStencilFunc(GL_EQUAL, planeMask, planeMask); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); }