Home | History | Annotate | Download | only in functional

Lines Matching refs:StencilOp

112 class StencilOp
134 StencilOp (Type type_, GLenum stencilTest_ = GL_ALWAYS, int stencil_ = 0, GLenum depthTest_ = GL_ALWAYS, float depth_ = 1.0f, GLenum sFail_ = GL_KEEP, GLenum dFail_ = GL_KEEP, GLenum dPass_ = GL_KEEP)
147 static StencilOp clearStencil (int stencil)
149 StencilOp op(TYPE_CLEAR_STENCIL);
154 static StencilOp clearDepth (float depth)
156 StencilOp op(TYPE_CLEAR_DEPTH);
161 static StencilOp quad (GLenum stencilTest, int stencil, GLenum depthTest, float depth, GLenum sFail, GLenum dFail, GLenum dPass)
163 return StencilOp(TYPE_QUAD, stencilTest, stencil, depthTest, depth, sFail, dFail, dPass);
177 virtual void genOps (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil) = DE_NULL;
180 void executeOps (sglr::Context& context, const IVec4& cell, const vector<StencilOp>& ops);
205 void StencilCase::executeOps (sglr::Context& context, const IVec4& cell, const vector<StencilOp>& ops)
215 for (vector<StencilOp>::const_iterator i = ops.begin(); i != ops.end(); i++)
217 const StencilOp& op = *i;
221 case StencilOp::TYPE_CLEAR_DEPTH:
229 case StencilOp::TYPE_CLEAR_STENCIL:
237 case StencilOp::TYPE_QUAD:
242 context.stencilOp(op.sFail, op.dFail, op.dPass);
260 context.stencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
301 vector<vector<StencilOp> > ops(numStencilValues+2);
387 typedef void (*GenStencilOpsFunc) (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil);
398 void genOps (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil)
412 static void genOps (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil) \
425 dst.push_back(StencilOp::clearStencil(targetStencil | ~mask));
431 dst.push_back(StencilOp::quad(GL_NEVER, targetStencil, GL_ALWAYS, 0.0f, GL_REPLACE, GL_KEEP, GL_KEEP));
435 dst.push_back(StencilOp::clearDepth(0.0f));
436 dst.push_back(StencilOp::quad(GL_ALWAYS, targetStencil, GL_LESS, 0.5f, GL_KEEP, GL_REPLACE, GL_KEEP));
440 dst.push_back(StencilOp::quad(GL_ALWAYS, targetStencil, GL_LESS, 0.0f, GL_KEEP, GL_KEEP, GL_REPLACE));
448 dst.push_back(StencilOp::clearStencil(targetStencil-1));
449 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_INCR, GL_KEEP, GL_KEEP));
452 dst.push_back(StencilOp::clearStencil(targetStencil));
459 dst.push_back(StencilOp::clearStencil(targetStencil+1));
460 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_DECR, GL_KEEP, GL_KEEP));
463 dst.push_back(StencilOp::clearStencil(targetStencil));
468 dst.push_back(StencilOp::clearStencil((targetStencil-1)&maxStencil));
469 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_INCR_WRAP, GL_KEEP, GL_KEEP));
474 dst.push_back(StencilOp::clearStencil((targetStencil+1)&maxStencil));
475 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_DECR_WRAP, GL_KEEP, GL_KEEP));
481 dst.push_back(StencilOp::clearStencil(targetStencil));
482 dst.push_back(StencilOp::quad(GL_NOTEQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_ZERO, GL_KEEP, GL_KEEP));
483 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_REPLACE, GL_KEEP, GL_KEEP));
488 dst.push_back(StencilOp::clearStencil((~targetStencil)&mask));
489 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_INVERT, GL_KEEP, GL_KEEP));
497 dst.push_back(StencilOp::clearStencil(inv));
498 dst.push_back(StencilOp::quad(GL_EQUAL, inv, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INVERT));
499 dst.push_back(StencilOp::quad(GL_EQUAL, inv, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INVERT));
505 dst.push_back(StencilOp::clearStencil(inv));
506 dst.push_back(StencilOp::quad(GL_NOTEQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INVERT));
507 dst.push_back(StencilOp
514 dst.push_back(StencilOp::clearStencil(targetStencil+1));
515 dst.push_back(StencilOp::quad(GL_LESS, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
516 dst.push_back(StencilOp::quad(GL_LESS, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
519 dst.push_back(StencilOp::clearStencil(targetStencil));
526 dst.push_back(StencilOp::clearStencil(targetStencil+1));
527 dst.push_back(StencilOp::quad(GL_LEQUAL, targetStencil+1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
528 dst.push_back(StencilOp::quad(GL_LEQUAL, targetStencil+1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
531 dst.push_back(StencilOp::clearStencil(targetStencil));
537 dst.push_back(StencilOp::clearStencil(targetStencil-1));
538 dst.push_back(StencilOp::quad(GL_GREATER, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
539 dst.push_back(StencilOp::quad(GL_GREATER, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
542 dst.push_back(StencilOp::clearStencil(targetStencil));
548 dst.push_back(StencilOp::clearStencil(targetStencil-1));
549 dst.push_back(StencilOp::quad(GL_GEQUAL, targetStencil-1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
550 dst.push_back(StencilOp::quad(GL_GEQUAL, targetStencil-1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
553 dst.push_back(StencilOp::clearStencil(targetStencil));
559 dst.push_back(StencilOp::clearStencil(~targetStencil));
560 StencilOp op = StencilOp::quad(GL_EQUAL, (~targetStencil | ~mask) & valMask, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INVERT);