Techberth - Forum

Engineering Discussions => Computer Science IT Tutorials => Topic started by: admin1 on October 22, 2016, 08:03:24 AM

Title: what is stencil buffer in OpenGL
Post by: admin1 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