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
diff options
context:
space:
mode:
-rw-r--r--graphics/geometry_batcher.cpp1
-rw-r--r--graphics/opengl/renderer.cpp22
-rw-r--r--map/render_policy.cpp1
3 files changed, 13 insertions, 11 deletions
diff --git a/graphics/geometry_batcher.cpp b/graphics/geometry_batcher.cpp
index a87dffd3d8..7bdefc827c 100644
--- a/graphics/geometry_batcher.cpp
+++ b/graphics/geometry_batcher.cpp
@@ -195,6 +195,7 @@ namespace graphics
m_pipelines[i].m_verticesDrawn = 0;
m_pipelines[i].m_indicesDrawn = 0;
}
+ base_t::applyStates();
}
void GeometryBatcher::clear(graphics::Color const & c, bool clearRT, float depth, bool clearDepth)
diff --git a/graphics/opengl/renderer.cpp b/graphics/opengl/renderer.cpp
index 8c352d6f21..b2b4926207 100644
--- a/graphics/opengl/renderer.cpp
+++ b/graphics/opengl/renderer.cpp
@@ -62,6 +62,14 @@ namespace graphics
CHECK(!m_isRendering, ("beginFrame called inside beginFrame/endFrame pair!"));
m_isRendering = true;
+ math::Matrix<float, 4, 4> coordM;
+ getOrthoMatrix(coordM,
+ 0, m_width,
+ m_height, 0,
+ -graphics::maxDepth,
+ graphics::maxDepth);
+
+
if (m_frameBuffer)
{
m_frameBuffer->setRenderTarget(m_renderTarget);
@@ -69,20 +77,12 @@ namespace graphics
processCommand(make_shared_ptr(new ChangeFrameBuffer(m_frameBuffer)));
- math::Matrix<float, 4, 4> coordM;
-
if (m_renderTarget != 0)
m_renderTarget->coordMatrix(coordM);
- else
- getOrthoMatrix(coordM,
- 0, m_frameBuffer->width(),
- m_frameBuffer->height(), 0,
- -graphics::maxDepth,
- graphics::maxDepth);
-
- processCommand(make_shared_ptr(new ChangeMatrix(EProjection, coordM)));
- processCommand(make_shared_ptr(new ChangeMatrix(EModelView, math::Identity<float, 4>())));
}
+
+ processCommand(make_shared_ptr(new ChangeMatrix(EProjection, coordM)));
+ processCommand(make_shared_ptr(new ChangeMatrix(EModelView, math::Identity<float, 4>())));
}
bool Renderer::isRendering() const
diff --git a/map/render_policy.cpp b/map/render_policy.cpp
index e744a37fc9..23c9cb91e9 100644
--- a/map/render_policy.cpp
+++ b/map/render_policy.cpp
@@ -64,6 +64,7 @@ void RenderPolicy::InitCacheScreen()
m2::RectI const RenderPolicy::OnSize(int w, int h)
{
+ m_cacheScreen->onSize(w, h);
m_drawer->onSize(w, h);
return m2::RectI(0, 0, w, h);
}