The value is 4 because you have your stencil op for when the stencil test passes set to GL_REPLACE. GL_REPLACE simply replaces the current value in the stencil buffer with the reference value.
I saw your question there but wasnt sure what you were trying to ask. Can you restate/simplify your question?
edit: I looked at the link to the .txt file. That is using the two sided stencil extension. Is there a reason why you want to use the two sided stencil extension?
[This message has been edited by ioquan (edited 10-21-2003).]
I wasn’t looking into using the two sided stencil extension. I was just trying to understand how to set the stencil values. So I followed the logic and it didn’t work like it said it should work. Hope that makes sense.
Basically, I found an error in the documentation and I wanted to share and make sure I was not wrong.