namespace Msp {
namespace GL {
-StencilTest::StencilTest():
- enabled(false),
- compare(ALWAYS),
- stencil_fail_op(KEEP),
- depth_fail_op(KEEP),
- depth_pass_op(KEEP),
- reference(0)
-{ }
-
-
StencilTest::Loader::Loader(StencilTest &st):
ObjectLoader<StencilTest>(st)
{
}
-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");
- }
-}
-
void operator>>(const LexicalConverter &conv, StencilOp &op)
{
const string &str = conv.get();