diff options
Diffstat (limited to 'map')
-rw-r--r-- | map/coverage_generator.cpp | 1 | ||||
-rw-r--r-- | map/tile_renderer.cpp | 6 | ||||
-rw-r--r-- | map/tiling_render_policy_mt.cpp | 3 | ||||
-rw-r--r-- | map/tiling_render_policy_st.cpp | 2 |
4 files changed, 10 insertions, 2 deletions
diff --git a/map/coverage_generator.cpp b/map/coverage_generator.cpp index 1c7018a2a9..f96f61baf9 100644 --- a/map/coverage_generator.cpp +++ b/map/coverage_generator.cpp @@ -60,6 +60,7 @@ ScreenCoverage * CoverageGenerator::CreateCoverage() params.m_doUnbindRT = false; params.m_isSynchronized = false; params.m_threadSlot = m_resourceManager->cacheThreadSlot(); + params.m_renderContext = m_renderContext; shared_ptr<graphics::Screen> screen(new graphics::Screen(params)); shared_ptr<graphics::Skin> skin(loadSkin(m_resourceManager, m_skinName)); diff --git a/map/tile_renderer.cpp b/map/tile_renderer.cpp index 5be34bf3ba..f39d325d90 100644 --- a/map/tile_renderer.cpp +++ b/map/tile_renderer.cpp @@ -49,6 +49,9 @@ TileRenderer::TileRenderer( for (unsigned i = 0; i < m_threadData.size(); ++i) { + if (!packetsQueues) + m_threadData[i].m_renderContext = m_primaryContext->createShared(); + Drawer::Params params; params.m_resourceManager = m_resourceManager; @@ -61,6 +64,7 @@ TileRenderer::TileRenderer( params.m_doUnbindRT = false; params.m_isSynchronized = false; params.m_skin = make_shared_ptr(graphics::loadSkin(m_resourceManager, m_skinName)); + params.m_renderContext = m_threadData[i].m_renderContext; /* params.m_isDebugging = true; params.m_drawPathes = false ; params.m_drawAreas = false; @@ -69,8 +73,6 @@ TileRenderer::TileRenderer( m_threadData[i].m_drawerParams = params; m_threadData[i].m_drawer = 0; - if (!packetsQueues) - 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 graphics::gl::RenderBuffer(tileWidth, tileHeight, true)); diff --git a/map/tiling_render_policy_mt.cpp b/map/tiling_render_policy_mt.cpp index 62c8e431cc..4252382510 100644 --- a/map/tiling_render_policy_mt.cpp +++ b/map/tiling_render_policy_mt.cpp @@ -12,6 +12,8 @@ TilingRenderPolicyMT::TilingRenderPolicyMT(Params const & p) : BasicTilingRenderPolicy(p, false) { + int cpuCores = GetPlatform().CpuCores(); + graphics::ResourceManager::Params rmp = p.m_rmParams; rmp.checkDeviceCaps(); @@ -141,6 +143,7 @@ TilingRenderPolicyMT::TilingRenderPolicyMT(Params const & p) dp.m_useGuiResources = true; dp.m_isSynchronized = false; dp.m_fastSolidPath = true; + dp.m_renderContext = p.m_primaryRC; m_drawer.reset(new Drawer(dp)); diff --git a/map/tiling_render_policy_st.cpp b/map/tiling_render_policy_st.cpp index 97929cd4c2..f581de3be9 100644 --- a/map/tiling_render_policy_st.cpp +++ b/map/tiling_render_policy_st.cpp @@ -151,6 +151,8 @@ TilingRenderPolicyST::TilingRenderPolicyST(Params const & p) dp.m_useGuiResources = true; dp.m_isSynchronized = false; dp.m_fastSolidPath = true; + dp.m_renderContext = p.m_primaryRC; + // p.m_isDebugging = true; m_drawer.reset(new Drawer(dp)); |