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

text_handle.hpp « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ec3e993c5072d974932a95a36e982a540be00be (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once

#include "drape/overlay_handle.hpp"
#include "drape/pointers.hpp"
#include "drape/utils/vertex_decl.hpp"

#include "base/string_utils.hpp"

namespace dp
{
  class TextureManager;
}

namespace df
{

class TextHandle : public dp::OverlayHandle
{
public:
  TextHandle(FeatureID const & id, strings::UniString const & text,
             dp::Anchor anchor, uint64_t priority,
             ref_ptr<dp::TextureManager> textureManager,
             bool isBillboard = false);

  TextHandle(FeatureID const & id, strings::UniString const & text,
             dp::Anchor anchor, uint64_t priority,
             ref_ptr<dp::TextureManager> textureManager,
             gpu::TTextDynamicVertexBuffer && normals,
             bool IsBillboard = false);

  bool Update(ScreenBase const & screen) override;

  void GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutator) const override;

  bool IndexesRequired() const override;

  void SetForceUpdateNormals(bool forceUpdate) const;

#ifdef DEBUG_OVERLAYS_OUTPUT
  virtual string GetOverlayDebugInfo() override;
#endif

protected:
  gpu::TTextDynamicVertexBuffer m_buffer;
  mutable bool m_forceUpdateNormals;

private:
  mutable bool m_isLastVisible;

  strings::UniString m_text;
  ref_ptr<dp::TextureManager> m_textureManager;
  bool m_glyphsReady;
};


} // namespace df