PDA

View Full Version : bitwise operation with fp on stencil buffer



V-man
02-03-2003, 07:37 AM
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.

dare
02-03-2003, 07: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.

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