X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Fstenciltest_backend.cpp;fp=source%2Fbackends%2Fopengl%2Fstenciltest_backend.cpp;h=258bf9b89f28263c60b87801db3d71ce7ed2e3ad;hb=160e9eea29bd10034733d59507fa1bcca36be401;hp=0000000000000000000000000000000000000000;hpb=93448d16e72e38afbaecbccf6fdedd46d6a82a73;p=libs%2Fgl.git diff --git a/source/backends/opengl/stenciltest_backend.cpp b/source/backends/opengl/stenciltest_backend.cpp new file mode 100644 index 00000000..258bf9b8 --- /dev/null +++ b/source/backends/opengl/stenciltest_backend.cpp @@ -0,0 +1,27 @@ +#include "gl.h" +#include "stenciltest.h" +#include "stenciltest_backend.h" + +using namespace std; + +namespace Msp { +namespace GL { + +unsigned get_gl_stencil_op(StencilOp op) +{ + switch(op) + { + case KEEP: return GL_KEEP; + case SET_ZERO: return GL_ZERO; + case REPLACE: return GL_REPLACE; + case INCR: return GL_INCR; + case DECR: return GL_DECR; + case INVERT: return GL_INVERT; + case INCR_WRAP: return GL_INCR_WRAP; + case DECR_WRAP: return GL_DECR_WRAP; + default: throw invalid_argument("get_gl_stencil_op"); + } +} + +} // namespace GL +} // namespace Msp