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

Method draw

core/2d/DrawNode.cpp:208–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void DrawNode::draw(Renderer* renderer, const Mat4& transform, uint32_t flags)
209{
210 if (_trianglesDirty || _pointsDirty || _linesDirty)
211 updateBuffers();
212
213 if (_customCommandTriangle.getVertexDrawCount() > 0)
214 {
215 updateBlendState(_customCommandTriangle);
216 updateUniforms(transform, _customCommandTriangle);
217 _customCommandTriangle.init(_globalZOrder);
218 renderer->addCommand(&_customCommandTriangle);
219 }
220
221 if (_customCommandPoint.getVertexDrawCount() > 0)
222 {
223 updateBlendState(_customCommandPoint);
224 updateUniforms(transform, _customCommandPoint);
225 _customCommandPoint.init(_globalZOrder);
226 renderer->addCommand(&_customCommandPoint);
227 }
228
229 if (_customCommandLine.getVertexDrawCount() > 0)
230 {
231 updateBlendState(_customCommandLine);
232 updateUniforms(transform, _customCommandLine);
233 _customCommandLine.init(_globalZOrder);
234 renderer->addCommand(&_customCommandLine);
235 }
236}
237
238static void udpateCommand(CustomCommand& cmd, const axstd::pod_vector<V2F_C4B_T2F>& buffer)
239{

Callers

nothing calls this directly

Calls 3

updateUniformsFunction · 0.85
initMethod · 0.45
addCommandMethod · 0.45

Tested by

no test coverage detected