Introduction

This sample demonstrates the use of the stencil buffer for rendering constructive solid geometry (or CSG in short).

CSG allows the construction of complex models by combining simple shapes via boolean operators (union, difference, intersection and more).

Controls

Press Esc or click the close button to exit.
Press Space to toggle wireframe mode on/off.
Move the mouse to rotate the camera.
Scroll the mouse wheel to zoom in/out.