Stencil Buffer

Hello
Im a new Beginner in OpenGL. I wanna know what is Stencil Buffer and what can we do by use it. I read little about it on internet, but couldnt figure out Its capability.
Is there a full tutorial with sample codes on internet that can help me.

thanks alot

The Stencil buffer is an extra buffer that can restrict pixels from being drawn.

But, I have a Voodoo3 so I wouldnt know.

normally… stencil buffer was used in shadow mapping … try to save the modelview matrix to the stencil buffer and render as shadow…

I’ve got a question. Is the scencil buffer slow? For example if I wanted to make some shadows is the scencil buffer the best way to do it?

If you are using anything more than a voodoo (TNT or above), with a 24 bit depth buffer, stencil is just about free.
Stencil shadows (shadow volumes, NOT shadow maps) are a good way to do shadows. There are plenty of discussions here on shadow volumes vs shadow maps.