MCPcopy Create free account
hub / github.com/comaps/comaps / UploadData

Method UploadData

libs/drape/vertex_array_buffer.cpp:223–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223void VertexArrayBuffer::UploadData(ref_ptr<GraphicsContext> context, BindingInfo const & bindingInfo, void const * data,
224 uint32_t count)
225{
226 ref_ptr<DataBuffer> buffer;
227 if (!bindingInfo.IsDynamic())
228 buffer = GetOrCreateStaticBuffer(bindingInfo);
229 else
230 buffer = GetOrCreateDynamicBuffer(bindingInfo);
231
232 // For Vulkan rendering we have to know the whole collection of binding info.
233 if (context->GetApiVersion() == dp::ApiVersion::Vulkan && !m_impl)
234 CollectBindingInfo(bindingInfo);
235
236 if (count > 0)
237 m_isChanged = true;
238 buffer->GetBuffer()->UploadData(context, data, count);
239}
240
241ref_ptr<DataBuffer> VertexArrayBuffer::GetOrCreateDynamicBuffer(BindingInfo const & bindingInfo)
242{

Callers 1

UploadIndicesMethod · 0.45

Calls 3

IsDynamicMethod · 0.45
GetApiVersionMethod · 0.45
GetBufferMethod · 0.45

Tested by

no test coverage detected