| 175 | } |
| 176 | |
| 177 | void 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 | |
| 201 | void Pass::updateMVPUniform(const Mat4& modelView) |
| 202 | { |
nothing calls this directly
no test coverage detected