| 23 | namespace df |
| 24 | { |
| 25 | void DrapeApiRenderer::AddRenderProperties(ref_ptr<dp::GraphicsContext> context, ref_ptr<gpu::ProgramManager> mng, |
| 26 | std::vector<drape_ptr<DrapeApiRenderProperty>> && properties) |
| 27 | { |
| 28 | if (properties.empty()) |
| 29 | return; |
| 30 | |
| 31 | size_t const startIndex = m_properties.size(); |
| 32 | m_properties.reserve(m_properties.size() + properties.size()); |
| 33 | std::move(properties.begin(), properties.end(), std::back_inserter(m_properties)); |
| 34 | for (size_t i = startIndex; i < m_properties.size(); i++) |
| 35 | { |
| 36 | for (auto const & bucket : m_properties[i]->m_buckets) |
| 37 | { |
| 38 | auto program = mng->GetProgram(bucket.first.GetProgram<gpu::Program>()); |
| 39 | program->Bind(); |
| 40 | bucket.second->GetBuffer()->Build(context, program); |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | void DrapeApiRenderer::RemoveRenderProperty(std::string const & id) |
| 46 | { |
no test coverage detected