forked from organicmaps/organicmaps
Some new tests
This commit is contained in:
parent
276f9e382a
commit
934e697909
2 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -49,8 +49,8 @@ private:
|
|||
MasterPointer<TextureManager> m_textures;
|
||||
df::Viewport m_viewport;
|
||||
|
||||
typedef map<GLState, MasterPointer<RenderBucket> > scene_t;
|
||||
scene_t m_scene;
|
||||
typedef map<GLState, vector<MasterPointer<RenderBucket> > > TScene;
|
||||
TScene m_scene;
|
||||
|
||||
UniformValuesStorage m_generalUniforms;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue