styling fixes and code cleanup.

This commit is contained in:
rachytski 2012-01-26 13:04:35 +04:00 committed by Alex Zolotarev
parent 9f596d99de
commit e6bb6837f3
4 changed files with 6 additions and 2 deletions

View file

@ -48,7 +48,6 @@ TileRenderer::TileRenderer(
params.m_resourceManager = m_resourceManager;
params.m_frameBuffer = make_shared_ptr(new yg::gl::FrameBuffer());
params.m_frameBuffer->setDepthBuffer(make_shared_ptr(new yg::gl::RenderBuffer(tileWidth, tileHeight, true)));
params.m_glyphCacheID = m_resourceManager->renderThreadGlyphCacheID(i);
params.m_threadID = i;
@ -67,6 +66,7 @@ TileRenderer::TileRenderer(
m_threadData[i].m_drawer = 0;
m_threadData[i].m_renderContext = m_primaryContext->createShared();
m_threadData[i].m_dummyRT = m_resourceManager->createRenderTarget(2, 2);
m_threadData[i].m_depthBuffer = make_shared_ptr(new yg::gl::RenderBuffer(tileWidth, tileHeight, true));
}
m_queue.AddInitCommand(bind(&TileRenderer::InitializeThreadGL, this, _1));
@ -97,6 +97,7 @@ void TileRenderer::InitializeThreadGL(core::CommandsQueue::Environment const & e
threadData.m_renderContext->makeCurrent();
threadData.m_drawer = new DrawerYG(threadData.m_drawerParams);
threadData.m_drawer->onSize(tileWidth, tileHeight);
threadData.m_drawer->screen()->setDepthBuffer(threadData.m_depthBuffer);
}
void TileRenderer::FinalizeThreadGL(core::CommandsQueue::Environment const & env)

View file

@ -42,6 +42,7 @@ protected:
DrawerYG::params_t m_drawerParams;
shared_ptr<yg::gl::BaseTexture> m_dummyRT;
shared_ptr<yg::gl::RenderContext> m_renderContext;
shared_ptr<yg::gl::RenderBuffer> m_depthBuffer;
};
buffer_vector<ThreadData, 4> m_threadData;

View file

@ -248,6 +248,8 @@ void TilingRenderPolicyST::DrawFrame(shared_ptr<PaintEvent> const & e, ScreenBas
pDrawer->endFrame();
// yg::gl::g_doLogOGLCalls = false;
m_resourceManager->updatePoolState();
}
int TilingRenderPolicyST::GetDrawScale(ScreenBase const & s) const

View file

@ -665,7 +665,7 @@ namespace yg
int ResourceManager::renderThreadGlyphCacheID(int threadNum) const
{
ASSERT(threadNum < m_params.m_glyphCacheParams.m_renderThreadCount, ());
ASSERT(threadNum < m_params.m_glyphCacheParams.m_renderThreadCount, (threadNum, m_params.m_glyphCacheParams.m_renderThreadCount));
return 1 + threadNum;
}