Welcome to mirror list, hosted at ThFree Co, Russian Federation.

render_policy_mt.hpp « map - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 13dba5f56460398f6ea8a746de69a3e4dd8bc727 (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 "render_policy.hpp"
#include "render_queue.hpp"
#include "../geometry/point2d.hpp"

class WindowHandle;

class RenderPolicyMT : public RenderPolicy
{
private:

  RenderQueue m_renderQueue;
  bool m_DoAddCommand;

public:
  RenderPolicyMT(shared_ptr<WindowHandle> const & wh,
                 RenderPolicy::TRenderFn const & renderFn);

  void Initialize(shared_ptr<yg::gl::RenderContext> const & rc,
                  shared_ptr<yg::ResourceManager> const & rm);

  void BeginFrame(shared_ptr<PaintEvent> const & e,
                  ScreenBase const & s);

  void DrawFrame(shared_ptr<PaintEvent> const & e,
                 ScreenBase const & s);

  void EndFrame(shared_ptr<PaintEvent> const & e,
                ScreenBase const & s);

  m2::RectI const OnSize(int w, int h);

  void StartDrag(m2::PointD const & pt, double timeInSec);
  void StopDrag(m2::PointD const & pt, double timeInSec);

  void StartScale(m2::PointD const & pt1, m2::PointD const & pt2, double timeInSec);
  void StopScale(m2::PointD const & pt1, m2::PointD const & pt2, double timeInSec);

  RenderQueue & GetRenderQueue();

};