Author Topic: what is stencil buffer in OpenGL  (Read 1488 times)

admin1

  • Administrator
  • Newbie
  • *****
  • Posts: 47
    • View Profile
what is stencil buffer in OpenGL
« on: October 22, 2016, 08:03:24 AM »
the stencil buffer is used to restrict drawing to certain portions of the
screen. Think of it like a cardboard stencil that can be used with a can of
spray paint to make fairly precise painted images. For example, a classic use
is to simulate the view of a rear-view mirror in a car. You render the shape
of the mirror to the stencil buffer, and then draw the entire scene. The
stencil buffer prevents anything that wouldn’t be visible in the mirror from
being drawn.

graphics programming interview questions