diff options
-rw-r--r-- | drape_frontend/CMakeLists.txt | 1 | ||||
-rwxr-xr-x | drape_frontend/drape_frontend.pro | 1 | ||||
-rw-r--r-- | drape_frontend/route_builder.cpp | 10 | ||||
-rw-r--r-- | drape_frontend/route_builder.hpp | 7 | ||||
-rw-r--r-- | drape_frontend/route_renderer.cpp | 51 | ||||
-rw-r--r-- | drape_frontend/route_renderer.hpp | 3 | ||||
-rw-r--r-- | drape_frontend/route_shape.cpp | 12 | ||||
-rw-r--r-- | drape_frontend/route_shape.hpp | 14 | ||||
-rw-r--r-- | drape_frontend/shaders/route.fsh.glsl | 21 | ||||
-rw-r--r-- | drape_frontend/shaders/route_arrow.fsh.glsl | 19 | ||||
-rw-r--r-- | drape_frontend/shaders/route_dash.fsh.glsl | 20 | ||||
-rw-r--r-- | drape_frontend/shaders/shader_index.txt | 2 | ||||
-rw-r--r-- | map/routing_manager.cpp | 4 | ||||
-rw-r--r-- | xcode/drape_frontend/drape_frontend.xcodeproj/project.pbxproj | 14 | ||||
-rw-r--r-- | xcode/omim.xcworkspace/contents.xcworkspacedata | 3 |
15 files changed, 136 insertions, 46 deletions
diff --git a/drape_frontend/CMakeLists.txt b/drape_frontend/CMakeLists.txt index bdb55cf80d..0ab7df5fb5 100644 --- a/drape_frontend/CMakeLists.txt +++ b/drape_frontend/CMakeLists.txt @@ -252,6 +252,7 @@ set( shaders/position_accuracy3d.vsh.glsl shaders/route.fsh.glsl shaders/route.vsh.glsl + shaders/route_arrow.fsh.glsl shaders/route_arrow.vsh.glsl shaders/route_dash.fsh.glsl shaders/ruler.vsh.glsl diff --git a/drape_frontend/drape_frontend.pro b/drape_frontend/drape_frontend.pro index d5b094a571..65ed3c70b5 100755 --- a/drape_frontend/drape_frontend.pro +++ b/drape_frontend/drape_frontend.pro @@ -244,6 +244,7 @@ OTHER_FILES += \ shaders/position_accuracy3d.vsh.glsl \ shaders/route.fsh.glsl \ shaders/route.vsh.glsl \ + shaders/route_arrow.fsh.glsl \ shaders/route_arrow.vsh.glsl \ shaders/route_dash.fsh.glsl \ shaders/ruler.vsh.glsl \ diff --git a/drape_frontend/route_builder.cpp b/drape_frontend/route_builder.cpp index 37e0973fd8..be450ec959 100644 --- a/drape_frontend/route_builder.cpp +++ b/drape_frontend/route_builder.cpp @@ -19,7 +19,10 @@ void RouteBuilder::Build(dp::DrapeID subrouteId, drape_ptr<Subroute> && subroute routeData->m_pivot = routeData->m_subroute->m_polyline.GetLimitRect().Center(); routeData->m_recacheId = recacheId; RouteShape::CacheRoute(textures, *routeData.get()); - m_routeCache.insert(std::make_pair(subrouteId, routeData->m_subroute->m_polyline)); + RouteCacheData cacheData; + cacheData.m_polyline = routeData->m_subroute->m_polyline; + cacheData.m_baseDepthIndex = routeData->m_subroute->m_baseDepthIndex; + m_routeCache.insert(std::make_pair(subrouteId, std::move(cacheData))); // Flush route geometry. GLFunctions::glFlush(); @@ -42,9 +45,10 @@ void RouteBuilder::BuildArrows(dp::DrapeID subrouteId, std::vector<ArrowBorders> drape_ptr<RouteArrowsData> routeArrowsData = make_unique_dp<RouteArrowsData>(); routeArrowsData->m_subrouteId = subrouteId; - routeArrowsData->m_pivot = it->second.GetLimitRect().Center(); + routeArrowsData->m_pivot = it->second.m_polyline.GetLimitRect().Center(); routeArrowsData->m_recacheId = recacheId; - RouteShape::CacheRouteArrows(textures, it->second, borders, *routeArrowsData.get()); + RouteShape::CacheRouteArrows(textures, it->second.m_polyline, borders, + it->second.m_baseDepthIndex, *routeArrowsData.get()); // Flush route arrows geometry. GLFunctions::glFlush(); diff --git a/drape_frontend/route_builder.hpp b/drape_frontend/route_builder.hpp index 166a9abca0..f027aa5650 100644 --- a/drape_frontend/route_builder.hpp +++ b/drape_frontend/route_builder.hpp @@ -37,6 +37,11 @@ private: TFlushRouteFn m_flushRouteFn; TFlushRouteArrowsFn m_flushRouteArrowsFn; - std::unordered_map<dp::DrapeID, m2::PolylineD> m_routeCache; + struct RouteCacheData + { + m2::PolylineD m_polyline; + double m_baseDepthIndex = 0.0; + }; + std::unordered_map<dp::DrapeID, RouteCacheData> m_routeCache; }; } // namespace df diff --git a/drape_frontend/route_renderer.cpp b/drape_frontend/route_renderer.cpp index 069dc252aa..0738706a18 100644 --- a/drape_frontend/route_renderer.cpp +++ b/drape_frontend/route_renderer.cpp @@ -22,6 +22,11 @@ std::string const kRouteOutlineColor = "RouteOutline"; std::string const kRoutePedestrian = "RoutePedestrian"; std::string const kRouteBicycle = "RouteBicycle"; std::string const kRoutePreview = "RoutePreview"; +std::string const kRouteMaskCar = "RouteMaskCar"; +std::string const kRouteArrowsMaskCar = "RouteArrowsMaskCar"; +std::string const kRouteMaskBicycle = "RouteMaskBicycle"; +std::string const kRouteArrowsMaskBicycle = "RouteArrowsMaskBicycle"; +std::string const kRouteMaskPedestrian = "RouteMaskPedestrian"; namespace { @@ -255,7 +260,9 @@ void RouteRenderer::UpdateRoute(ScreenBase const & screen, CacheRouteArrowsCallb double zoom = 0.0; float halfWidth = 0.0; InterpolateByZoom(routeData->m_subroute, screen, halfWidth, zoom); + additional.m_routeType = routeData->m_subroute->m_routeType; additional.m_currentHalfWidth = halfWidth; + additional.m_baseDistance = routeData->m_subroute->m_baseDistance; if (zoom < kArrowAppearingZoomLevel) { @@ -312,15 +319,15 @@ void RouteRenderer::UpdatePreview(ScreenBase const & screen) auto const & info = previewSegment.second; m2::PolylineD polyline = {info.m_startPoint, info.m_finishPoint}; double const segmentLen = polyline.GetLength(); - size_t circlesCount = static_cast<size_t>(segmentLen / (diameterMercator + gapMercator)); + auto circlesCount = static_cast<size_t>(segmentLen / (diameterMercator + gapMercator)); if (circlesCount == 0) circlesCount = 1; double const distDelta = segmentLen / circlesCount; for (double d = distDelta * 0.5; d < segmentLen; d += distDelta) { - float const r = static_cast<float>(radiusMercator); m2::PointD const pt = polyline.GetPointByDistance(d); - m2::RectD const circleRect(pt.x - r, pt.y - r, pt.x + r, pt.y + r); + m2::RectD const circleRect(pt.x - radiusMercator, pt.y - radiusMercator, + pt.x + radiusMercator, pt.y + radiusMercator); if (!screen.ClipRect().IsIntersect(circleRect)) continue; @@ -363,6 +370,21 @@ CirclesPackHandle * RouteRenderer::GetPreviewHandle(size_t & index) return nullptr; } +dp::Color RouteRenderer::GetMaskColor(RouteType routeType, double baseDistance, + bool arrows) const +{ + if (baseDistance != 0.0 && m_distanceFromBegin < baseDistance) + { + if (routeType == RouteType::Car) + return GetColorConstant(arrows ? kRouteArrowsMaskCar : kRouteMaskCar); + else if (routeType == RouteType::Bicycle) + return GetColorConstant(arrows ? kRouteArrowsMaskBicycle : kRouteMaskBicycle); + else if (routeType == RouteType::Pedestrian) + return GetColorConstant(kRouteMaskPedestrian); + } + return {0, 0, 0, 0}; +} + void RouteRenderer::RenderRouteData(drape_ptr<RouteData> const & routeData, ScreenBase const & screen, bool trafficShown, ref_ptr<dp::GpuProgramManager> mng, @@ -376,8 +398,8 @@ void RouteRenderer::RenderRouteData(drape_ptr<RouteData> const & routeData, return; float const currentHalfWidth = m_routeAdditional[routeData->m_subrouteId].m_currentHalfWidth; - float const screenHalfWidth = static_cast<float>(currentHalfWidth * screen.GetScale()); - float dist = static_cast<float>(kInvalidDistance); + auto const screenHalfWidth = static_cast<float>(currentHalfWidth * screen.GetScale()); + auto dist = static_cast<float>(kInvalidDistance); if (m_followingEnabled) dist = static_cast<float>(m_distanceFromBegin - routeData->m_subroute->m_baseDistance); @@ -395,6 +417,11 @@ void RouteRenderer::RenderRouteData(drape_ptr<RouteData> const & routeData, uniforms.SetFloatValue("u_routeParams", currentHalfWidth, screenHalfWidth, dist, trafficShown ? 1.0f : 0.0f); + glsl::vec4 const maskColor = glsl::ToVec4(GetMaskColor(routeData->m_subroute->m_routeType, + routeData->m_subroute->m_baseDistance, + false /* arrows */)); + uniforms.SetFloatValue("u_maskColor", maskColor.r, maskColor.g, maskColor.b, maskColor.a); + if (subroute->m_pattern.m_isDashed) { uniforms.SetFloatValue("u_pattern", @@ -441,6 +468,11 @@ void RouteRenderer::RenderRouteArrowData(dp::DrapeID subrouteId, RouteAdditional uniforms.SetFloatValue("u_arrowHalfWidth", static_cast<float>(currentHalfWidth * kArrowHeightFactor)); uniforms.SetFloatValue("u_opacity", 1.0f); + glsl::vec4 const maskColor = glsl::ToVec4(GetMaskColor(routeAdditional.m_routeType, + routeAdditional.m_baseDistance, + true /* arrows */)); + uniforms.SetFloatValue("u_maskColor", maskColor.r, maskColor.g, maskColor.b, maskColor.a); + ref_ptr<dp::GpuProgram> prg = mng->GetProgram(gpu::ROUTE_ARROW_PROGRAM); prg->Bind(); dp::ApplyState(state, prg); @@ -502,6 +534,11 @@ void RouteRenderer::AddRouteData(drape_ptr<RouteData> && routeData, // Add new route data. m_routeData.push_back(std::move(routeData)); BuildBuckets(m_routeData.back()->m_renderProperty, mng); + std::sort(m_routeData.begin(), m_routeData.end(), + [](drape_ptr<RouteData> const & d1, drape_ptr<RouteData> const & d2) + { + return d1->m_subroute->m_baseDistance > d2->m_subroute->m_baseDistance; + }); } std::vector<drape_ptr<RouteData>> const & RouteRenderer::GetRouteData() const @@ -542,9 +579,9 @@ void RouteRenderer::AddPreviewRenderData(drape_ptr<CirclesPackRenderData> && ren // Save handle in the cache. auto & bucket = m_previewRenderData.back()->m_bucket; ASSERT_EQUAL(bucket->GetOverlayHandlesCount(), 1, ()); - CirclesPackHandle * handle = static_cast<CirclesPackHandle *>(bucket->GetOverlayHandle(0).get()); + auto handle = static_cast<CirclesPackHandle *>(bucket->GetOverlayHandle(0).get()); handle->Clear(); - m_previewHandlesCache.push_back(std::make_pair(handle, 0)); + m_previewHandlesCache.emplace_back(std::make_pair(handle, 0)); } void RouteRenderer::ClearRouteData() diff --git a/drape_frontend/route_renderer.hpp b/drape_frontend/route_renderer.hpp index 135dcce260..13a0460685 100644 --- a/drape_frontend/route_renderer.hpp +++ b/drape_frontend/route_renderer.hpp @@ -71,9 +71,11 @@ public: private: struct RouteAdditional { + RouteType m_routeType = RouteType::Car; drape_ptr<RouteArrowsData> m_arrowsData; std::vector<ArrowBorders> m_arrowBorders; float m_currentHalfWidth = 0.0f; + double m_baseDistance = 0.0; }; void RenderRouteData(drape_ptr<RouteData> const & routeData, ScreenBase const & screen, @@ -86,6 +88,7 @@ private: dp::UniformValuesStorage const & commonUniforms); void ClearPreviewHandles(); CirclesPackHandle * GetPreviewHandle(size_t & index); + dp::Color GetMaskColor(RouteType routeType, double baseDistance, bool arrows) const; double m_distanceFromBegin; std::vector<drape_ptr<RouteData>> m_routeData; diff --git a/drape_frontend/route_shape.cpp b/drape_frontend/route_shape.cpp index ea812f4969..dae56fd92a 100644 --- a/drape_frontend/route_shape.cpp +++ b/drape_frontend/route_shape.cpp @@ -23,6 +23,7 @@ float const kRightSide = -1.0f; float const kRouteDepth = 100.0f; float const kArrowsDepth = 200.0f; +float const kDepthPerSubroute = 200.0f; void GetArrowTextureRegion(ref_ptr<dp::TextureManager> textures, dp::TextureManager::SymbolRegion & region) @@ -133,7 +134,7 @@ void GenerateArrowsTriangles(glsl::vec4 const & pivot, std::vector<glsl::vec2> c } // namespace void RouteShape::PrepareGeometry(std::vector<m2::PointD> const & path, m2::PointD const & pivot, - std::vector<glsl::vec4> const & segmentsColors, + std::vector<glsl::vec4> const & segmentsColors, float baseDepth, TGeometryBuffer & geometry, TGeometryBuffer & joinsGeometry, double & outputLength) { @@ -153,7 +154,7 @@ void RouteShape::PrepareGeometry(std::vector<m2::PointD> const & path, m2::Point length += glsl::length(segments[i].m_points[EndPoint] - segments[i].m_points[StartPoint]); outputLength = length; - float depth = 0.0f; + float depth = baseDepth; float const depthStep = kRouteDepth / (1 + segments.size()); for (int i = static_cast<int>(segments.size() - 1); i >= 0; i--) { @@ -368,7 +369,7 @@ void RouteShape::PrepareArrowGeometry(std::vector<m2::PointD> const & path, m2:: } void RouteShape::CacheRouteArrows(ref_ptr<dp::TextureManager> mng, m2::PolylineD const & polyline, - std::vector<ArrowBorders> const & borders, + std::vector<ArrowBorders> const & borders, double baseDepthIndex, RouteArrowsData & routeArrowsData) { TArrowGeometryBuffer geometry; @@ -379,7 +380,7 @@ void RouteShape::CacheRouteArrows(ref_ptr<dp::TextureManager> mng, m2::PolylineD state.SetColorTexture(region.GetTexture()); // Generate arrow geometry. - float depth = kArrowsDepth; + auto depth = static_cast<float>(baseDepthIndex * kDepthPerSubroute) + kArrowsDepth; float const depthStep = (kArrowsDepth - kRouteDepth) / (1 + borders.size()); for (ArrowBorders const & b : borders) { @@ -407,12 +408,13 @@ void RouteShape::CacheRoute(ref_ptr<dp::TextureManager> textures, RouteData & ro float const alpha = (speedGroup == traffic::SpeedGroup::G4 || speedGroup == traffic::SpeedGroup::G5 || speedGroup == traffic::SpeedGroup::Unknown) ? 0.0f : 1.0f; - segmentsColors.push_back(glsl::vec4(color.GetRedF(), color.GetGreenF(), color.GetBlueF(), alpha)); + segmentsColors.emplace_back(color.GetRedF(), color.GetGreenF(), color.GetBlueF(), alpha); } TGeometryBuffer geometry; TGeometryBuffer joinsGeometry; PrepareGeometry(routeData.m_subroute->m_polyline.GetPoints(), routeData.m_pivot, segmentsColors, + static_cast<float>(routeData.m_subroute->m_baseDepthIndex * kDepthPerSubroute), geometry, joinsGeometry, routeData.m_length); auto state = CreateGLState(routeData.m_subroute->m_pattern.m_isDashed ? diff --git a/drape_frontend/route_shape.hpp b/drape_frontend/route_shape.hpp index 9f6da03385..1e52002664 100644 --- a/drape_frontend/route_shape.hpp +++ b/drape_frontend/route_shape.hpp @@ -64,16 +64,8 @@ struct Subroute std::vector<double> m_turns; std::vector<traffic::SpeedGroup> m_traffic; double m_baseDistance = 0.0; + double m_baseDepthIndex = 0.0; df::RoutePattern m_pattern; - - Subroute() = default; - Subroute(m2::PolylineD const & polyline, df::ColorConstant color, - std::vector<double> const & turns, - std::vector<traffic::SpeedGroup> const & traffic, - double baseDistance, df::RoutePattern pattern = df::RoutePattern()) - : m_polyline(polyline), m_color(color), m_turns(turns), m_traffic(traffic) - , m_baseDistance(baseDistance), m_pattern(pattern) - {} }; struct RouteRenderProperty @@ -119,12 +111,12 @@ public: static void CacheRoute(ref_ptr<dp::TextureManager> textures, RouteData & routeData); static void CacheRouteArrows(ref_ptr<dp::TextureManager> mng, m2::PolylineD const & polyline, - std::vector<ArrowBorders> const & borders, + std::vector<ArrowBorders> const & borders, double baseDepthIndex, RouteArrowsData & routeArrowsData); private: static void PrepareGeometry(std::vector<m2::PointD> const & path, m2::PointD const & pivot, - std::vector<glsl::vec4> const & segmentsColors, + std::vector<glsl::vec4> const & segmentsColors, float baseDepth, TGeometryBuffer & geometry, TGeometryBuffer & joinsGeometry, double & outputLength); static void PrepareArrowGeometry(std::vector<m2::PointD> const & path, m2::PointD const & pivot, diff --git a/drape_frontend/shaders/route.fsh.glsl b/drape_frontend/shaders/route.fsh.glsl index e7ad56df86..249940f2dc 100644 --- a/drape_frontend/shaders/route.fsh.glsl +++ b/drape_frontend/shaders/route.fsh.glsl @@ -1,3 +1,7 @@ +// Warning! Beware to use this shader. "discard" command may significally reduce performance. +// Unfortunately some CG algorithms cannot be implemented on OpenGL ES 2.0 without discarding +// fragments from depth buffer. + varying vec3 v_length; varying vec4 v_color; @@ -8,6 +12,7 @@ uniform sampler2D u_colorTex; uniform vec4 u_color; uniform vec4 u_outlineColor; uniform vec4 u_routeParams; +uniform vec4 u_maskColor; const float kAntialiasingThreshold = 0.92; @@ -16,13 +21,13 @@ const float kOutlineThreshold2 = 0.71; void main() { - vec4 color = vec4(0.0, 0.0, 0.0, 0.0); - if (v_length.x >= v_length.z) - { - color = mix(mix(u_color, vec4(v_color.rgb, 1.0), v_color.a), u_color, step(u_routeParams.w, 0.0)); - color = mix(color, u_outlineColor, step(kOutlineThreshold1, abs(v_length.y))); - color = mix(color, u_outlineColor, smoothstep(kOutlineThreshold2, kOutlineThreshold1, abs(v_length.y))); - color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_length.y))); - } + if (v_length.x < v_length.z) + discard; + + vec4 color = mix(mix(u_color, vec4(v_color.rgb, 1.0), v_color.a), u_color, step(u_routeParams.w, 0.0)); + color = mix(color, u_outlineColor, step(kOutlineThreshold1, abs(v_length.y))); + color = mix(color, u_outlineColor, smoothstep(kOutlineThreshold2, kOutlineThreshold1, abs(v_length.y))); + color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_length.y))); + color = vec4(mix(color.rgb, u_maskColor.rgb, u_maskColor.a), color.a); gl_FragColor = samsungGoogleNexusWorkaround(color); } diff --git a/drape_frontend/shaders/route_arrow.fsh.glsl b/drape_frontend/shaders/route_arrow.fsh.glsl new file mode 100644 index 0000000000..1f5d22e4fb --- /dev/null +++ b/drape_frontend/shaders/route_arrow.fsh.glsl @@ -0,0 +1,19 @@ +// Warning! Beware to use this shader. "discard" command may significally reduce performance. +// Unfortunately some CG algorithms cannot be implemented on OpenGL ES 2.0 without discarding +// fragments from depth buffer. + +uniform sampler2D u_colorTex; +uniform float u_opacity; +uniform vec4 u_maskColor; + +varying vec2 v_colorTexCoords; + +void main() +{ + vec4 finalColor = texture2D(u_colorTex, v_colorTexCoords); + finalColor.a *= u_opacity; + if (finalColor.a < 0.01) + discard; + finalColor = vec4(mix(finalColor.rgb, u_maskColor.rgb, u_maskColor.a), finalColor.a); + gl_FragColor = finalColor; +} diff --git a/drape_frontend/shaders/route_dash.fsh.glsl b/drape_frontend/shaders/route_dash.fsh.glsl index 6c162f6730..eed937cb60 100644 --- a/drape_frontend/shaders/route_dash.fsh.glsl +++ b/drape_frontend/shaders/route_dash.fsh.glsl @@ -1,3 +1,7 @@ +// Warning! Beware to use this shader. "discard" command may significally reduce performance. +// Unfortunately some CG algorithms cannot be implemented on OpenGL ES 2.0 without discarding +// fragments from depth buffer. + varying vec3 v_length; varying vec4 v_color; @@ -7,6 +11,7 @@ uniform sampler2D u_colorTex; uniform vec4 u_color; uniform vec2 u_pattern; +uniform vec4 u_maskColor; const float kAntialiasingThreshold = 0.92; @@ -19,15 +24,12 @@ float alphaFromPattern(float curLen, float dashLen, float gapLen) void main() { - vec4 color = u_color + v_color; if (v_length.x < v_length.z) - { - color.a = 0.0; - } - else - { - color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_length.y))) * - alphaFromPattern(v_length.x, u_pattern.x, u_pattern.y); - } + discard; + + vec4 color = u_color + v_color; + color.a *= (1.0 - smoothstep(kAntialiasingThreshold, 1.0, abs(v_length.y))) * + alphaFromPattern(v_length.x, u_pattern.x, u_pattern.y); + color = vec4(mix(color.rgb, u_maskColor.rgb, u_maskColor.a), color.a); gl_FragColor = samsungGoogleNexusWorkaround(color); } diff --git a/drape_frontend/shaders/shader_index.txt b/drape_frontend/shaders/shader_index.txt index 8e6c13c871..b53e6bf915 100644 --- a/drape_frontend/shaders/shader_index.txt +++ b/drape_frontend/shaders/shader_index.txt @@ -22,7 +22,7 @@ BOOKMARK_PROGRAM user_mark.vsh.glsl discarded_texturing.fsh.glsl BOOKMARK_ANIM_PROGRAM user_mark.vsh.glsl discarded_texturing.fsh.glsl ROUTE_PROGRAM route.vsh.glsl route.fsh.glsl ROUTE_DASH_PROGRAM route.vsh.glsl route_dash.fsh.glsl -ROUTE_ARROW_PROGRAM route_arrow.vsh.glsl discarded_texturing.fsh.glsl +ROUTE_ARROW_PROGRAM route_arrow.vsh.glsl route_arrow.fsh.glsl CIRCLE_POINT_PROGRAM circle_point.vsh.glsl circle_point.fsh.glsl DEBUG_RECT_PROGRAM debug_rect.vsh.glsl debug_rect.fsh.glsl SCREEN_QUAD_PROGRAM screen_quad.vsh.glsl texturing.fsh.glsl diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index 1bc11104ed..debdc8b627 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -431,7 +431,8 @@ void RoutingManager::InsertRoute(Route const & route) std::vector<RouteSegment> segments; std::vector<m2::PointD> points; double distance = 0.0; - for (size_t subrouteIndex = route.GetCurrentSubrouteIdx(); subrouteIndex < route.GetSubrouteCount(); ++subrouteIndex) + auto const subroutesCount = route.GetSubrouteCount(); + for (size_t subrouteIndex = route.GetCurrentSubrouteIdx(); subrouteIndex < subroutesCount; ++subrouteIndex) { route.GetSubrouteInfo(subrouteIndex, segments); @@ -452,6 +453,7 @@ void RoutingManager::InsertRoute(Route const & route) auto subroute = make_unique_dp<df::Subroute>(); subroute->m_polyline = m2::PolylineD(points); subroute->m_baseDistance = currentBaseDistance; + subroute->m_baseDepthIndex = static_cast<double>(subroutesCount - subrouteIndex - 1); switch (m_currentRouterType) { case RouterType::Vehicle: diff --git a/xcode/drape_frontend/drape_frontend.xcodeproj/project.pbxproj b/xcode/drape_frontend/drape_frontend.xcodeproj/project.pbxproj index 1dbd7473ae..b031b3558f 100644 --- a/xcode/drape_frontend/drape_frontend.xcodeproj/project.pbxproj +++ b/xcode/drape_frontend/drape_frontend.xcodeproj/project.pbxproj @@ -248,6 +248,13 @@ 454C19BA1CCE3EC0002A2C86 /* animation_system.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = animation_system.hpp; sourceTree = "<group>"; }; 45580AB81E28DB2600CD535D /* scenario_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scenario_manager.cpp; sourceTree = "<group>"; }; 45580AB91E28DB2600CD535D /* scenario_manager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = scenario_manager.hpp; sourceTree = "<group>"; }; + 455FFE391F3896F600F68481 /* route_arrow.fsh.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = route_arrow.fsh.glsl; path = shaders/route_arrow.fsh.glsl; sourceTree = "<group>"; }; + 455FFE3A1F3896F600F68481 /* smaa_blending_weight.fsh.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = smaa_blending_weight.fsh.glsl; path = shaders/smaa_blending_weight.fsh.glsl; sourceTree = "<group>"; }; + 455FFE3B1F3896F600F68481 /* smaa_blending_weight.vsh.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = smaa_blending_weight.vsh.glsl; path = shaders/smaa_blending_weight.vsh.glsl; sourceTree = "<group>"; }; + 455FFE3C1F3896F600F68481 /* smaa_edges.fsh.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = smaa_edges.fsh.glsl; path = shaders/smaa_edges.fsh.glsl; sourceTree = "<group>"; }; + 455FFE3D1F3896F600F68481 /* smaa_edges.vsh.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = smaa_edges.vsh.glsl; path = shaders/smaa_edges.vsh.glsl; sourceTree = "<group>"; }; + 455FFE3E1F3896F600F68481 /* smaa_final.fsh.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = smaa_final.fsh.glsl; path = shaders/smaa_final.fsh.glsl; sourceTree = "<group>"; }; + 455FFE3F1F3896F600F68481 /* smaa_final.vsh.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = smaa_final.vsh.glsl; path = shaders/smaa_final.vsh.glsl; sourceTree = "<group>"; }; 4560692B1EB9F9D2009AB7B7 /* shaders_lib.glsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = shaders_lib.glsl; path = shaders/shaders_lib.glsl; sourceTree = "<group>"; }; 456B3F971ED464FE009B3D1F /* postprocess_renderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = postprocess_renderer.cpp; sourceTree = "<group>"; }; 456B3F981ED464FE009B3D1F /* postprocess_renderer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = postprocess_renderer.hpp; sourceTree = "<group>"; }; @@ -472,6 +479,13 @@ 45BB02221EB8BE1400FE5C0C /* shaders */ = { isa = PBXGroup; children = ( + 455FFE391F3896F600F68481 /* route_arrow.fsh.glsl */, + 455FFE3A1F3896F600F68481 /* smaa_blending_weight.fsh.glsl */, + 455FFE3B1F3896F600F68481 /* smaa_blending_weight.vsh.glsl */, + 455FFE3C1F3896F600F68481 /* smaa_edges.fsh.glsl */, + 455FFE3D1F3896F600F68481 /* smaa_edges.vsh.glsl */, + 455FFE3E1F3896F600F68481 /* smaa_final.fsh.glsl */, + 455FFE3F1F3896F600F68481 /* smaa_final.vsh.glsl */, 451A2A7E1EE8463F003E05A4 /* circle_point.fsh.glsl */, 451A2A7F1EE8463F003E05A4 /* circle_point.vsh.glsl */, 4560692B1EB9F9D2009AB7B7 /* shaders_lib.glsl */, diff --git a/xcode/omim.xcworkspace/contents.xcworkspacedata b/xcode/omim.xcworkspace/contents.xcworkspacedata index 33504aa5c8..063498015e 100644 --- a/xcode/omim.xcworkspace/contents.xcworkspacedata +++ b/xcode/omim.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,9 @@ <Workspace version = "1.0"> <FileRef + location = "group:../../../../Downloads/BegSav.gpx"> + </FileRef> + <FileRef location = "container:common-debug.xcconfig"> </FileRef> <FileRef |