Lines Matching defs:targetStencil
180 virtual void genOps (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil) = DE_NULL;
390 typedef void (*GenStencilOpsFunc) (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil);
401 void genOps (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil)
403 m_genOps(dst, stencilBits, depthBits, targetStencil);
415 static void genOps (vector<StencilOp>& dst, int stencilBits, int depthBits, int targetStencil) \
428 dst.push_back(StencilOp::clearStencil(targetStencil | ~mask));
434 dst.push_back(StencilOp::quad(GL_NEVER, targetStencil, GL_ALWAYS, 0.0f, GL_REPLACE, GL_KEEP, GL_KEEP));
439 dst.push_back(StencilOp::quad(GL_ALWAYS, targetStencil, GL_LESS, 0.5f, GL_KEEP, GL_REPLACE, GL_KEEP));
443 dst.push_back(StencilOp::quad(GL_ALWAYS, targetStencil, GL_LESS, 0.0f, GL_KEEP, GL_KEEP, GL_REPLACE));
449 if (targetStencil > 0)
451 dst.push_back(StencilOp::clearStencil(targetStencil-1));
452 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_INCR, GL_KEEP, GL_KEEP));
455 dst.push_back(StencilOp::clearStencil(targetStencil));
460 if (targetStencil < maxStencil)
462 dst.push_back(StencilOp::clearStencil(targetStencil+1));
463 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_DECR, GL_KEEP, GL_KEEP));
466 dst.push_back(StencilOp::clearStencil(targetStencil));
471 dst.push_back(StencilOp::clearStencil((targetStencil-1)&maxStencil));
472 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_INCR_WRAP, GL_KEEP, GL_KEEP));
477 dst.push_back(StencilOp::clearStencil((targetStencil+1)&maxStencil));
478 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_DECR_WRAP, GL_KEEP, GL_KEEP));
484 dst.push_back(StencilOp::clearStencil(targetStencil));
485 dst.push_back(StencilOp::quad(GL_NOTEQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_ZERO, GL_KEEP, GL_KEEP));
486 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_REPLACE, GL_KEEP, GL_KEEP));
491 dst.push_back(StencilOp::clearStencil((~targetStencil)&mask));
492 dst.push_back(StencilOp::quad(GL_EQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_INVERT, GL_KEEP, GL_KEEP));
499 int inv = (~targetStencil)&mask;
507 int inv = (~targetStencil)&mask;
509 dst.push_back(StencilOp::quad(GL_NOTEQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INVERT));
510 dst.push_back(StencilOp::quad(GL_NOTEQUAL, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INVERT));
515 if (targetStencil < maxStencil)
517 dst.push_back(StencilOp::clearStencil(targetStencil+1));
518 dst.push_back(StencilOp::quad(GL_LESS, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
519 dst.push_back(StencilOp::quad(GL_LESS, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
522 dst.push_back(StencilOp::clearStencil(targetStencil));
527 if (targetStencil < maxStencil)
529 dst.push_back(StencilOp::clearStencil(targetStencil+1));
530 dst.push_back(StencilOp::quad(GL_LEQUAL, targetStencil+1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
531 dst.push_back(StencilOp::quad(GL_LEQUAL, targetStencil+1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_DECR));
534 dst.push_back(StencilOp::clearStencil(targetStencil));
538 if (targetStencil > 0)
540 dst.push_back(StencilOp::clearStencil(targetStencil-1));
541 dst.push_back(StencilOp::quad(GL_GREATER, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
542 dst.push_back(StencilOp::quad(GL_GREATER, targetStencil, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
545 dst.push_back(StencilOp::clearStencil(targetStencil));
549 if (targetStencil > 0)
551 dst.push_back(StencilOp::clearStencil(targetStencil-1));
552 dst.push_back(StencilOp::quad(GL_GEQUAL, targetStencil-1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
553 dst.push_back(StencilOp::quad(GL_GEQUAL, targetStencil-1, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INCR));
556 dst.push_back(StencilOp::clearStencil(targetStencil));
562 dst.push_back(StencilOp::clearStencil(~targetStencil));
563 StencilOp op = StencilOp::quad(GL_EQUAL, (~targetStencil | ~mask) & valMask, GL_ALWAYS, 0.0f, GL_KEEP, GL_KEEP, GL_INVERT);