| 574 | } |
| 575 | |
| 576 | void RenderTexture::draw(Renderer* renderer, const Mat4& transform, uint32_t flags) |
| 577 | { |
| 578 | if (_autoDraw) |
| 579 | { |
| 580 | // Begin will create a render group using new render target |
| 581 | begin(); |
| 582 | |
| 583 | // clear screen |
| 584 | _director->getRenderer()->clear(_clearFlags, _clearColor, _clearDepth, _clearStencil, _globalZOrder); |
| 585 | |
| 586 | //! make sure all children are drawn |
| 587 | sortAllChildren(); |
| 588 | |
| 589 | for (const auto& child : _children) |
| 590 | { |
| 591 | if (child != _sprite) |
| 592 | child->visit(renderer, transform, flags); |
| 593 | } |
| 594 | |
| 595 | // End will pop the current render group |
| 596 | end(); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | void RenderTexture::onBegin() |
| 601 | { |
nothing calls this directly
no test coverage detected