From: <io...@cr...> - 2000-05-02 03:37:12
|
>> >> 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 Thanks for your quick response! Ok... then, in the example, since the mask is 0xFFEA and the original value is 0x003E, the stencil value will be probably unaffected by the operation, and thus never incremented, right? Well, I think this means "back to the blueprints" for me, but well... thanks anyway! - Heriberto Delgado (io...@cr..., her...@su...) |