Simple addon for using stencil buffer.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
README.md

README.md

ofxStencil

Simple addon for using stencil buffer. Code adapted from:
http://www.videotutorialsrock.com/opengl_tutorial/reflections/video.php

You need to enable stencil buffer in main.cpp, for example:

ofAppGlutWindow window; window.setGlutDisplayString("stencil~2 rgba double samples>=4 depth");

Usage:

ofxStencil stencil; stencil.beginDrawingStencil(); //draw your mask stencil.beginUsingStencil(); //draw what you want masked stencil.endUsingStencil();