PDA

View Full Version : Stencil test for sprite collision. Help



Andreas K
07-13-2010, 11:35 AM
Hi,

I want to code a stencil test. But dont have occlusion query
available since it shall also run on opengles.

So the current idea is to work with the stencil buffer, draw
first sprite, then change stencilfunc and draw second.

After that I read out with glreadpixels. But then i have problems with alpha sections e.g.

Any better idea?

Thx
andreas

ZbuffeR
07-14-2010, 03:42 AM
Use alpha test, to skip "alpha sections".