MCPcopy Create free account
hub / github.com/axmolengine/axmol / draw

Method draw

core/2d/RenderTexture.cpp:576–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void 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
600void RenderTexture::onBegin()
601{

Callers

nothing calls this directly

Calls 5

getRendererMethod · 0.80
beginFunction · 0.50
endFunction · 0.50
clearMethod · 0.45
visitMethod · 0.45

Tested by

no test coverage detected