bitwise operation with fp on stencil buffer

Hi,

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?

stencil>>2;

What extension can do this kind of thing?

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

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.

Umm… Are talking about using fragment programs or just plain GL?