diff --git a/graphics/coordinates.cpp b/graphics/coordinates.cpp index 4b5aea6a17..13981e60bb 100644 --- a/graphics/coordinates.cpp +++ b/graphics/coordinates.cpp @@ -12,7 +12,7 @@ namespace graphics { m(0, 0) = 2 / (r - l); m(0, 1) = 0; m(0, 2) = 0; m(0, 3) = -(r + l) / (r - l); m(1, 0) = 0; m(1, 1) = 2 / (t - b);m(1, 2) = 0; m(1, 3) = -(t + b) / (t - b); - m(2, 0) = 0; m(2, 1) = 0; m(2, 2) = 2 / (f - n); m(2, 3) = - (f + n) / (f - n); + m(2, 0) = 0; m(2, 1) = 0; m(2, 2) = -2 / (f - n); m(2, 3) = (f + n) / (f - n); m(3, 0) = 0; m(3, 1) = 0; m(3, 2) = 0; m(3, 3) = 1; } } diff --git a/graphics/geometry_batcher.hpp b/graphics/geometry_batcher.hpp index 0234219e88..30e36343e9 100644 --- a/graphics/geometry_batcher.hpp +++ b/graphics/geometry_batcher.hpp @@ -85,7 +85,7 @@ namespace graphics void enableClipRect(bool flag); void setClipRect(m2::RectI const & rect); - void clear(Color const & c, bool clearRT = true, float depth = -1.0, bool clearDepth = true); + void clear(Color const & c, bool clearRT = true, float depth = 1.0, bool clearDepth = true); /// @} unsigned reservePipelines(vector > const & caches, diff --git a/graphics/opengl/geometry_renderer.cpp b/graphics/opengl/geometry_renderer.cpp index 274d5a87d9..89d202670b 100644 --- a/graphics/opengl/geometry_renderer.cpp +++ b/graphics/opengl/geometry_renderer.cpp @@ -466,7 +466,7 @@ namespace graphics OGLCHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)); OGLCHECK(glEnable(GL_DEPTH_TEST)); - OGLCHECK(glDepthFunc(GL_GEQUAL)); + OGLCHECK(glDepthFunc(GL_LEQUAL)); OGLCHECK(glEnable(GL_BLEND)); OGLCHECK(glDepthMask(GL_TRUE)); @@ -536,7 +536,7 @@ namespace graphics OGLCHECK(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)); OGLCHECK(glEnable(GL_DEPTH_TEST)); - OGLCHECK(glDepthFunc(GL_GEQUAL)); + OGLCHECK(glDepthFunc(GL_LEQUAL)); OGLCHECK(glEnable(GL_BLEND)); OGLCHECK(glDepthMask(GL_TRUE)); diff --git a/graphics/opengl/renderer.hpp b/graphics/opengl/renderer.hpp index e6963e03f0..8628b3113a 100644 --- a/graphics/opengl/renderer.hpp +++ b/graphics/opengl/renderer.hpp @@ -162,7 +162,7 @@ namespace graphics /// @warning this function respects the clipping rect set and enabled(!) /// by the setClipRect/enableClipRect. Whether the clipping is /// not enabled - the entire currently bound render surface is used. - void clear(graphics::Color const & c, bool clearRT = true, float depth = -1.0, bool clearDepth = true); + void clear(graphics::Color const & c, bool clearRT = true, float depth = 1.0, bool clearDepth = true); void onSize(unsigned width, unsigned height); diff --git a/map/drawer.hpp b/map/drawer.hpp index f5f75b658e..30199cccac 100644 --- a/map/drawer.hpp +++ b/map/drawer.hpp @@ -110,7 +110,7 @@ public: void beginFrame(); void endFrame(); - void clear(graphics::Color const & c = graphics::Color(187, 187, 187, 255), bool clearRT = true, float depth = -1.0f, bool clearDepth = true); + void clear(graphics::Color const & c = graphics::Color(187, 187, 187, 255), bool clearRT = true, float depth = 1.0f, bool clearDepth = true); void onSize(int w, int h);