MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / drawStencil

Method drawStencil

Source/Node/ClipNode.cpp:140–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void ClipNode::drawStencil(uint8_t maskLayer, bool value) {
141 uint32_t func = BGFX_STENCIL_TEST_NEVER | BGFX_STENCIL_FUNC_REF(maskLayer) | BGFX_STENCIL_FUNC_RMASK(maskLayer);
142 uint32_t fail = value ? BGFX_STENCIL_OP_FAIL_S_REPLACE : BGFX_STENCIL_OP_FAIL_S_ZERO;
143 uint32_t op = fail | BGFX_STENCIL_OP_FAIL_Z_KEEP | BGFX_STENCIL_OP_PASS_Z_KEEP;
144 SharedRendererManager.pushStencilState(func | op, [&]() {
145 _stencil->visit();
146 SharedRendererManager.flush();
147 });
148}
149
150void ClipNode::setupAlphaTest() {
151 if (_stencil) {

Callers

nothing calls this directly

Calls 3

pushStencilStateMethod · 0.45
visitMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected