| 34 | } |
| 35 | |
| 36 | void GraphicRenderer2D::EndScene() { |
| 37 | |
| 38 | /*std::for_each(std::begin(m_mesh_map), std::end(m_mesh_map), [this](const std::pair<unsigned int, std::vector<Meshes::Mesh>>& value) { |
| 39 | const auto& material = value.second.at(0).GetMaterial(); |
| 40 | const auto& shader = material->GetShader(); |
| 41 | |
| 42 | std::vector<Storages::GraphicVertex> vertices; |
| 43 | std::for_each(std::begin(value.second), std::end(value.second), [&vertices](const Meshes::Mesh& mesh) { |
| 44 | const auto& mesh_vertices = mesh.GetGeometry()->GetVertices(); |
| 45 | std::copy(std::begin(mesh_vertices), std::end(mesh_vertices), std::back_inserter(vertices)); |
| 46 | }); |
| 47 | |
| 48 | Ref<Storages::GraphicRendererStorage<float, unsigned int>> graphic_storage; |
| 49 | graphic_storage.reset(new Storages::GraphicRendererStorage<float, unsigned int>{shader, vertices, material, m_storage_type}); |
| 50 | m_graphic_storage_list.emplace(graphic_storage); |
| 51 | }); |
| 52 | |
| 53 | while (!m_graphic_storage_list.empty()) { |
| 54 | const auto& storage = m_graphic_storage_list.front(); |
| 55 | this->Submit(storage); |
| 56 | m_graphic_storage_list.pop(); |
| 57 | } |
| 58 | |
| 59 | m_mesh_map.clear();*/ |
| 60 | } |
| 61 | } // namespace ZEngine::Rendering::Renderers |
nothing calls this directly
no outgoing calls
no test coverage detected