diff options
author | Roman Sorokin <sorok-roma@yandex.ru> | 2014-07-11 21:34:41 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:20:34 +0300 |
commit | 934e69790985b64f2c410482b6baf9718943e224 (patch) | |
tree | 936965c206632e464c7479aa54bfbe8a7837894d /drape_head/testing_engine.cpp | |
parent | 276f9e382ae415fa9fa60efe46b54d18d80ffed8 (diff) |
Some new tests
Diffstat (limited to 'drape_head/testing_engine.cpp')
-rw-r--r-- | drape_head/testing_engine.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drape_head/testing_engine.cpp b/drape_head/testing_engine.cpp index 0f330372f1..91d17d2282 100644 --- a/drape_head/testing_engine.cpp +++ b/drape_head/testing_engine.cpp @@ -292,7 +292,7 @@ void TestingEngine::Draw() GLFunctions::glClear(); GLFunctions::glDisable(gl_const::GLDepthTest); - scene_t::iterator it = m_scene.begin(); + TScene::iterator it = m_scene.begin(); for(; it != m_scene.end(); ++it) { GLState const & state = it->first; @@ -302,7 +302,9 @@ void TestingEngine::Draw() ApplyState(state, prg, MakeStackRefPointer<TextureSetController>(&binder)); ApplyUniforms(m_generalUniforms, prg); - it->second->Render(); + vector<MasterPointer<RenderBucket> > & buckets = it->second; + for (size_t i = 0; i < buckets.size(); ++i) + buckets[i]->Render(); } context->present(); @@ -390,12 +392,14 @@ void TestingEngine::OnFlushData(GLState const & state, TransferPointer<RenderBuc { MasterPointer<RenderBucket> bucket(vao); bucket->GetBuffer()->Build(m_programManager->GetProgram(state.GetProgramIndex())); - m_scene.insert(make_pair(state, bucket)); + m_scene[state].push_back(bucket); } void TestingEngine::ClearScene() { - (void)GetRangeDeletor(m_scene, MasterPointerDeleter())(); + TScene::iterator it = m_scene.begin(); + for(; it != m_scene.end(); ++it) + DeleteRange(it->second, MasterPointerDeleter()); } } // namespace df |