From: Brian P. <br...@pr...> - 2000-05-02 03:49:44
|
io...@cr... wrote: > > 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? The later, I believe. In pseudo-code: Read stencil value, call it v. Apply stencil op to v, such as increment/decrement. Write v to the stencil buffer with write masking. Masking is only applied upon writes. -Brian |