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

Function udpateCommand

core/2d/DrawNode.cpp:238–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238static void udpateCommand(CustomCommand& cmd, const axstd::pod_vector<V2F_C4B_T2F>& buffer)
239{
240 if (buffer.empty())
241 {
242 cmd.setVertexBuffer(nullptr);
243 }
244 else
245 {
246 cmd.createVertexBuffer(sizeof(V2F_C4B_T2F), buffer.size(), CustomCommand::BufferUsage::STATIC);
247 cmd.updateVertexBuffer(buffer.data(), buffer.size() * sizeof(V2F_C4B_T2F));
248 }
249
250 cmd.setVertexDrawInfo(0, buffer.size());
251}
252
253void DrawNode::updateBuffers()
254{

Callers 1

updateBuffersMethod · 0.85

Calls 6

createVertexBufferMethod · 0.80
emptyMethod · 0.45
setVertexBufferMethod · 0.45
sizeMethod · 0.45
updateVertexBufferMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected