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

Method draw

core/renderer/Pass.cpp:177–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void Pass::draw(MeshCommand* meshCommand,
178 float globalZOrder,
179 backend::Buffer* vertexBuffer,
180 backend::Buffer* indexBuffer,
181 MeshCommand::PrimitiveType primitive,
182 MeshCommand::IndexFormat indexFormat,
183 unsigned int indexCount,
184 const Mat4& modelView)
185{
186
187 meshCommand->setBeforeCallback(AX_CALLBACK_0(Pass::onBeforeVisitCmd, this, meshCommand));
188 meshCommand->setAfterCallback(AX_CALLBACK_0(Pass::onAfterVisitCmd, this, meshCommand));
189 meshCommand->init(globalZOrder, modelView);
190 meshCommand->setPrimitiveType(primitive);
191 meshCommand->setIndexBuffer(indexBuffer, indexFormat);
192 meshCommand->setVertexBuffer(vertexBuffer);
193 meshCommand->setIndexDrawInfo(0, indexCount);
194 meshCommand->getPipelineDescriptor().programState = _programState;
195
196 auto* renderer = Director::getInstance()->getRenderer();
197
198 renderer->addCommand(meshCommand);
199}
200
201void Pass::updateMVPUniform(const Mat4& modelView)
202{

Callers

nothing calls this directly

Calls 6

getInstanceFunction · 0.85
getRendererMethod · 0.80
initMethod · 0.45
setIndexBufferMethod · 0.45
setVertexBufferMethod · 0.45
addCommandMethod · 0.45

Tested by

no test coverage detected