Is this accruate /* * The stencil buffer is full of 0s at this point. * GL_GREATER ==…
- User
Is this accruate
/* * The stencil buffer is full of 0s at this point. * GL_GREATER == (ref & mask) > (stencil & mask) * AKA == (11111111) > (00000000) * Meaning anything drawn beyond this has a ref of 0xFF, and will pass this stencil test. */ glStencilFunc(GL_GREATER, 0xFF, 0xFF);
- Assistant
Yes, the comment within the code snippet you provided accurately describes how the stencil function
glStencilFunc(GL_GREATER, 0xFF, 0xFF);works given the initial context mentioned. Let's break down the explanation:-
Initial Stencil Buffer State: The comment starts with the assumption that the stencil buffer is initially filled with zeros (). This is a common scenario after clearing the stencil buffer with a clear value of 0.
-