blob: 2c98279bf448ae27fa9cdfe3d20d68f268938691 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#pragma once
#include "drape/drape_diagnostics.hpp"
#include "drape/gpu_program_manager.hpp"
#include "drape/overlay_tree.hpp"
#include "drape/pointers.hpp"
#include "geometry/rect2d.hpp"
#include "geometry/screenbase.hpp"
namespace dp
{
class DebugRectRenderer
{
public:
static DebugRectRenderer & Instance();
void Init(ref_ptr<dp::GpuProgramManager> mng);
void Destroy();
bool IsEnabled() const;
void SetEnabled(bool enabled);
void DrawRect(ScreenBase const & screen, m2::RectF const & rect, dp::Color const & color) const;
#ifdef COLLECT_DISPLACEMENT_INFO
void DrawArrow(ScreenBase const & screen, OverlayTree::DisplacementData const & data) const;
#endif
private:
DebugRectRenderer();
~DebugRectRenderer();
int m_VAO;
int m_vertexBuffer;
ref_ptr<dp::GpuProgram> m_program;
bool m_isEnabled;
};
} // namespace dp
|