From: <io...@cr...> - 2000-05-02 02:16:39
|
Hi everybody! I'm doing this question in this list because nobody else could answer me in a way I can understand it. Sorry if this is off- topic, but my project REALLY needs an answer to this question. Hope you, Brian, or any other GL expert, can finally tell me about it. What happens to a stencil index value in the stencil buffer when I specify GL_INCR or GL_DECR as the stencil operations to do with glStencilOp() for any of the stencil tests, if I call glStencilMask() with a mask value different than all 1's? Does the stencil index gets just incremented/decremented? Or the value is gathered, incremented/decremented, and then masked to be written again to the stencil buffer? An example: A fragment at (xw = 50, yw = 50) is about to be renderized at the framebuffer. The 16-bit stencil buffer value at (50,50) is 0x003E. The GL is told to GL_INCR the stencil values when the depth test fails. Additionally, glStencilMask(0xFFEA) was called. The depth test fails for the fragment at (50,50). What will be the new value of the stencil buffer at (50,50) (assuming there are no more operations applied to the stencil buffer)? The OpenGL specification is not very clear, at least for me, on this subject, so I hope anyone of you can answer me that. Thanks in advance. - Heriberto Delgado (io...@cr..., her...@su...) |