title: Writing to the OpenGL Stencil Buffer
body: <p>I've been reading about the stencil buffer in OpenGL. The basic concept makes sense; a fragment is only drawn if it meets a certain condition after being bitwise ANDed with a value in the stencil buffer. But one thing I don't understand is how you actually write to the stencil buffer. Is there a function that I'm missing here?</p>
  
  <p>P.S. When I say write, I mean specify the specific values in the stencil buffer.</p>