| 221 | } |
| 222 | |
| 223 | void 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 | |
| 241 | ref_ptr<DataBuffer> VertexArrayBuffer::GetOrCreateDynamicBuffer(BindingInfo const & bindingInfo) |
| 242 | { |
no test coverage detected