I've been trying to generate reflection with a stencil buffer for a school project. I was following this tutorial: http://www.opengl.org/archives/resources/code/samples/mjktips/Reflect.html It describes how to create a reflection by reflecting the scene over a plane and draw it again to create the reflection, then clipping the reflection to get rid of the parts sticking out.
I followed the tutorial but nothing is clipping, the reflection is shown in full. I tried the following:
int i;
glGetIntegerv(GL_STENCIL_BITS,&i);
std::cout << "Stencil bits is " << i << std::endl;
And the output is "Stencil bits is 0". So I do not have a stencil buffer at all. How do you create a stencil buffer in Gtkmm ( I read that creating a stencil buffer is library specific )?