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

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/drape
diff options
context:
space:
mode:
authorRoman Sorokin <sorok-roma@yandex.ru>2014-08-08 16:07:42 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:24:13 +0300
commit3c3c3ffd10f4b9997ab36bb37c604c541919eacf (patch)
treed3767f339db5522e2fd903cf196350418ba884b8 /drape
parent9328cd8fc26cf3526cbb139f3855b6c6585dbb96 (diff)
added BatcherFactory and method Reset for using with Object Pool
Diffstat (limited to 'drape')
-rw-r--r--drape/batcher.cpp6
-rw-r--r--drape/batcher.hpp8
2 files changed, 12 insertions, 2 deletions
diff --git a/drape/batcher.cpp b/drape/batcher.cpp
index 692f0a04ef..96c4dba15d 100644
--- a/drape/batcher.cpp
+++ b/drape/batcher.cpp
@@ -150,6 +150,10 @@ void Batcher::EndSession()
m_flushInterface = flush_fn();
}
+void Batcher::Reset()
+{
+}
+
void Batcher::ChangeBuffer(RefPointer<CallbacksWrapper> wrapper, bool checkFilledBuffer)
{
if (wrapper->IsVAOFilled() || checkFilledBuffer == false)
@@ -223,4 +227,4 @@ void Batcher::InsertTriangles(GLState const & state,
bucket->AddOverlayHandle(handle.Move());
}
-} // namespace dp \ No newline at end of file
+} // namespace dp
diff --git a/drape/batcher.hpp b/drape/batcher.hpp
index 01b11b5ad4..b2f2ec05d2 100644
--- a/drape/batcher.hpp
+++ b/drape/batcher.hpp
@@ -9,7 +9,6 @@
#include "../std/map.hpp"
#include "../std/function.hpp"
-
namespace dp
{
@@ -43,6 +42,7 @@ public:
typedef function<void (GLState const &, TransferPointer<RenderBucket> )> flush_fn;
void StartSession(flush_fn const & flusher);
void EndSession();
+ void Reset();
private:
@@ -70,4 +70,10 @@ private:
uint32_t m_vertexBufferSize;
};
+class BatcherFactory
+{
+public:
+ Batcher * GetNew() const { return new Batcher(); }
+};
+
} // namespace dp