| 84 | } |
| 85 | |
| 86 | void DebugRectRenderer::SetRect(ref_ptr<dp::GraphicsContext> context, m2::RectF const & rect, ScreenBase const & screen) |
| 87 | { |
| 88 | std::vector<float> vertices; |
| 89 | PixelPointToScreenSpace(screen, rect.LeftBottom(), vertices); |
| 90 | PixelPointToScreenSpace(screen, rect.LeftTop(), vertices); |
| 91 | PixelPointToScreenSpace(screen, rect.RightTop(), vertices); |
| 92 | PixelPointToScreenSpace(screen, rect.RightBottom(), vertices); |
| 93 | PixelPointToScreenSpace(screen, rect.LeftBottom(), vertices); |
| 94 | |
| 95 | ASSERT_LESS_OR_EQUAL(m_currentRectMesh, m_rectMeshes.size(), ()); |
| 96 | if (m_currentRectMesh == m_rectMeshes.size()) |
| 97 | m_rectMeshes.emplace_back(CreateMesh(context, m_program, std::move(vertices), "DebugRect")); |
| 98 | else |
| 99 | m_rectMeshes[m_currentRectMesh]->UpdateBuffer(context, 0 /* bufferInd */, vertices); |
| 100 | } |
| 101 | |
| 102 | void DebugRectRenderer::DrawRect(ref_ptr<dp::GraphicsContext> context, ScreenBase const & screen, |
| 103 | m2::RectF const & rect, dp::Color const & color) |
nothing calls this directly
no test coverage detected