Constructive solid geometry (CSG)

Is the stencil buffer suited for constructive solid geometry with objects, which
are drawn with GL_Quads for example?

Where are the limits of these technique?

I’m looking for example programms, which are using the stencil buffer for constructive solid geometry (CSG), perhaps with MFC.

You may find this thread on the advanced forum informative.

http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=012396

Can you recommend anything for CSG in OpenGL?

It really depends on what you are doing and the complexity of your objects.

The stencil buffer approach requires a lot of fillrate so depending on the speed of your 3d card, there will be a “break even” point where using the stencil buffer technique requires the same time as doing it the hard way by calculating the resulting triangles manually.

I am afraid there is no “one size, fits all” solution and hence I cant recommend a technique.

Regards