diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2015-01-23 19:03:16 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2015-11-30 16:04:00 +0300 |
commit | 7230f95a75b0f83ce45f5c758959343bc6d3b277 (patch) | |
tree | 36973cc5291ddee09b06532f426869f9d301443e /drape_frontend/render_group.hpp | |
parent | 053e4b054e77562ef1a798bf0862f589869817db (diff) |
[drape] user marks rendering layer
Diffstat (limited to 'drape_frontend/render_group.hpp')
-rw-r--r-- | drape_frontend/render_group.hpp | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/drape_frontend/render_group.hpp b/drape_frontend/render_group.hpp index 571a627a49..1888dce930 100644 --- a/drape_frontend/render_group.hpp +++ b/drape_frontend/render_group.hpp @@ -15,9 +15,27 @@ namespace dp { class OverlayTree; } namespace df { -class RenderGroup +class BaseRenderGroup { public: + BaseRenderGroup(dp::GLState const & state, TileKey const & tileKey) + : m_state(state) + , m_tileKey(tileKey) {} + + dp::GLState const & GetState() const { return m_state; } + TileKey const & GetTileKey() const { return m_tileKey; } + +protected: + dp::GLState m_state; + +private: + TileKey m_tileKey; +}; + +class RenderGroup : public BaseRenderGroup +{ + typedef BaseRenderGroup TBase; +public: RenderGroup(dp::GLState const & state, TileKey const & tileKey); ~RenderGroup(); @@ -28,9 +46,6 @@ public: void PrepareForAdd(size_t countForAdd); void AddBucket(dp::TransferPointer<dp::RenderBucket> bucket); - dp::GLState const & GetState() const { return m_state; } - TileKey const & GetTileKey() const { return m_tileKey; } - bool IsEmpty() const { return m_renderBuckets.empty(); } void DeleteLater() const { m_pendingOnDelete = true; } bool IsPendingOnDelete() const { return m_pendingOnDelete; } @@ -38,17 +53,15 @@ public: bool IsLess(RenderGroup const & other) const; private: - dp::GLState m_state; - TileKey m_tileKey; vector<dp::MasterPointer<dp::RenderBucket> > m_renderBuckets; mutable bool m_pendingOnDelete; }; -class RenderBucketComparator +class RenderGroupComparator { public: - RenderBucketComparator(set<TileKey> const & activeTiles); + RenderGroupComparator(set<TileKey> const & activeTiles); void ResetInternalState(); @@ -60,4 +73,24 @@ private: bool m_needBucketsMergeOperation; }; +class UserMarkRenderGroup : public BaseRenderGroup +{ + typedef BaseRenderGroup TBase; + +public: + UserMarkRenderGroup(dp::GLState const & state, TileKey const & tileKey); + ~UserMarkRenderGroup(); + + void SetIsVisible(bool isVisible); + bool IsVisible(); + + void Clear(); + void SetRenderBucket(dp::GLState const & state, dp::TransferPointer<dp::RenderBucket> bucket); + void Render(ScreenBase const & screen); + +private: + bool m_isVisible; + dp::MasterPointer<dp::RenderBucket> m_renderBucket; +}; + } // namespace df |