| 138 | } |
| 139 | |
| 140 | void 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 | |
| 150 | void ClipNode::setupAlphaTest() { |
| 151 | if (_stencil) { |
nothing calls this directly
no test coverage detected