View Full Version : bitwise operation with fp on stencil buffer

02-03-2003, 06:37 AM

I'm reading some more on fp but this thing is quite long. So I have some quick newbie questions :

Can I do something like

if((stencil & 0x00000001) | | (stencil & 0x0000100))

and how about bit shifting left or right?


What extension can do this kind of thing?

PS: the above code is obviously not in the proper language, but you get the idea.

02-03-2003, 06:57 AM
I did some stencil modifications too, not exactly those but maybe this helps:
draw big rect to cover the scene (you can disable depth, color etc..) set stencil to pass always and use appropriate stencil op.

02-04-2003, 09:25 AM
Umm... Are talking about using fragment programs or just plain GL?