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

Method draw

tests/cpp-tests/Source/NodeTest/NodeTest.cpp:973–981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971}
972
973void MySprite::draw(Renderer* renderer, const Mat4& transform, uint32_t flags)
974{
975 const auto& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
976 auto mvpMatrix = projectionMat * transform;
977 _customCommand.getPipelineDescriptor().programState->setUniform(_mvpMatrixLocation, mvpMatrix.m,
978 sizeof(mvpMatrix.m));
979 _customCommand.init(_globalZOrder, transform, flags);
980 renderer->addCommand(&_customCommand);
981}
982
983//------------------------------------------------------------------
984//

Callers

nothing calls this directly

Calls 4

getInstanceFunction · 0.85
setUniformMethod · 0.45
initMethod · 0.45
addCommandMethod · 0.45

Tested by

no test coverage detected