I have rendered a scene with the stencil test enabled. Now I want to render in white color all the places where the value of the stencil test is 2 or more (for instance).
What I do is to render a GL_QUAD for all the screen with the stencil test activated and just paint those pixels who passes the stencil test. That works fine.
I define the stencil function as this:
glStencilFunc(GL_EQUAL, popularPlaceValue-1, popularPlaceValue-1);
Where popularPlaceValue is an uint of my class. That renders in white color all the pixels where the stencil value is exactly the value popularPlaceValue.
What I want is to render in white all the pixels where stencil value <= popularPlaceValue.
Does anyone can help me?