filled gluCylinder

Hello,

I am using

gluQuadricDrawStyle(pQuadObj, GLU_FILL);

with the intent of filling the inside volume of a cylinder, such that if I use clip planes through it, I see a solid cut plane.

But I do only see the outline :frowning:

What do I have to do to get this changed?

Thanks!

GLU_FILL is just about filling polygons not the inside of the volume.

EDIT:

I think this is possible to obtain this effect using a shader. I have never tried this, but I am thinking that you may give the clipping plane equation to the shader and determine in a fragment shader if a fragment is on top or underneath the plane. In the first case you do all lighting calculations as if you were on the plane (using plane normal, etc…)

This effect can be acheive by using the stencil buffer. There was a demo @ ati.com that demonstrated this a long time ago.

I have found something interesting about using the stencil buffer here

Great folks, thanks!