From 1e5502ce9092b3271e18a956e75afd432b489251 Mon Sep 17 00:00:00 2001 From: ExMix Date: Tue, 5 Aug 2014 12:33:04 +0300 Subject: [PATCH] [drape] use new depth layer for geometry objects with dynamic attributes --- drape/glstate.hpp | 2 ++ drape_frontend/path_symbol_shape.cpp | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drape/glstate.hpp b/drape/glstate.hpp index f39781d4dc..65bb0b8e39 100644 --- a/drape/glstate.hpp +++ b/drape/glstate.hpp @@ -28,7 +28,9 @@ class GLState public: enum DepthLayer { + /// Do not change order GeometryLayer, + DynamicGeometry, OverlayLayer }; diff --git a/drape_frontend/path_symbol_shape.cpp b/drape_frontend/path_symbol_shape.cpp index c0728b0c4f..5c736d92d3 100644 --- a/drape_frontend/path_symbol_shape.cpp +++ b/drape_frontend/path_symbol_shape.cpp @@ -24,7 +24,10 @@ public: : OverlayHandle(FeatureID(), dp::Center, 0.0f), m_params(params), m_path(spl), m_scaleFactor(1.0f), m_positions(maxCount * 6), m_maxCount(maxCount), - m_symbolHalfWidth(hw), m_symbolHalfHeight(hh) {} + m_symbolHalfWidth(hw), m_symbolHalfHeight(hh) + { + SetIsVisible(true); + } virtual void Update(ScreenBase const & screen) { @@ -103,10 +106,6 @@ void PathSymbolShape::Draw(dp::RefPointer batcher, dp::RefPointerGetSymbolRegion(m_params.m_symbolName, region); - dp::GLState state(gpu::TEXTURING_PROGRAM, dp::GLState::OverlayLayer); - state.SetTextureSet(region.GetTextureNode().m_textureSet); - state.SetBlending(dp::Blending(true)); - m2::RectF const & rect = region.GetTexRect(); float textureNum = (float)region.GetTextureNode().m_textureOffset; m2::PointU pixelSize; @@ -128,6 +127,10 @@ void PathSymbolShape::Draw(dp::RefPointer batcher, dp::RefPointer