]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/stenciltest_backend.cpp
Add support for padding in vertex formats
[libs/gl.git] / source / backends / opengl / stenciltest_backend.cpp
1 #include "gl.h"
2 #include "stenciltest.h"
3 #include "stenciltest_backend.h"
4
5 using namespace std;
6
7 namespace Msp {
8 namespace GL {
9
10 unsigned get_gl_stencil_op(StencilOp op)
11 {
12         switch(op)
13         {
14         case KEEP: return GL_KEEP;
15         case SET_ZERO: return GL_ZERO;
16         case REPLACE: return GL_REPLACE;
17         case INCR: return GL_INCR;
18         case DECR: return GL_DECR;
19         case INVERT: return GL_INVERT;
20         case INCR_WRAP: return GL_INCR_WRAP;
21         case DECR_WRAP: return GL_DECR_WRAP;
22         default: throw invalid_argument("get_gl_stencil_op");
23         }
24 }
25
26 } // namespace GL
27 } // namespace Msp