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:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2020-06-09 15:00:36 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2020-07-02 17:53:53 +0300
commit8b0dd7d48c6b25991d25b99ff01a0c76177b1a1a (patch)
tree95c53a647997afe63a6acd5ee125dc28bdca1fe4 /drape_frontend/user_mark_shapes.cpp
parent7ff8d796a1e6be7e4d631c2bb7f5bae5844c335b (diff)
[guides on map][drape] Guides marks without shadows.
Diffstat (limited to 'drape_frontend/user_mark_shapes.cpp')
-rw-r--r--drape_frontend/user_mark_shapes.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/drape_frontend/user_mark_shapes.cpp b/drape_frontend/user_mark_shapes.cpp
index 1438a9b542..47bca8c8d9 100644
--- a/drape_frontend/user_mark_shapes.cpp
+++ b/drape_frontend/user_mark_shapes.cpp
@@ -84,7 +84,8 @@ struct UserPointVertex : public gpu::BaseVertex
offset += dp::FillDecl<TPosition, UserPointVertex>(0, "a_position", info, offset);
offset += dp::FillDecl<TNormal, UserPointVertex>(1, "a_normal", info, offset);
offset += dp::FillDecl<TTexCoord, UserPointVertex>(2, "a_texCoords", info, offset);
- offset += dp::FillDecl<TColorAndAnimate, UserPointVertex>(3, "a_colorAndAnimate", info, offset);
+ offset += dp::FillDecl<TColorAndAnimate, UserPointVertex>(3, "a_colorAndAnimateOrZ", info,
+ offset);
return info;
}
@@ -421,8 +422,6 @@ void CacheUserMarks(ref_ptr<dp::GraphicsContext> context, TileKey const & tileKe
m2::PointD const pixelOffset = renderInfo.m_pixelOffset;
glsl::vec2 const offset(pixelOffset.x, pixelOffset.y);
- up += offset;
- down += offset;
dp::Color color = dp::Color::White();
if (!renderInfo.m_color.empty())
@@ -430,17 +429,24 @@ void CacheUserMarks(ref_ptr<dp::GraphicsContext> context, TileKey const & tileKe
glsl::vec4 colorAndAnimate(color.GetRedF(), color.GetGreenF(), color.GetBlueF(),
runAnim ? 1.0f : -1.0f);
- buffer.emplace_back(pos, left + down,
- glsl::ToVec4(m2::PointD(texRect.LeftTop()), m2::PointD(bgTexRect.LeftTop())),
+ if (renderInfo.m_customDepth)
+ colorAndAnimate.w = 0.0f;
+
+ buffer.emplace_back(pos, left + down + offset,
+ glsl::ToVec4(m2::PointD(texRect.LeftTop()),
+ m2::PointD(bgTexRect.LeftTop())),
colorAndAnimate);
- buffer.emplace_back(pos, left + up,
- glsl::ToVec4(m2::PointD(texRect.LeftBottom()), m2::PointD(bgTexRect.LeftBottom())),
+ buffer.emplace_back(pos, left + up + offset,
+ glsl::ToVec4(m2::PointD(texRect.LeftBottom()),
+ m2::PointD(bgTexRect.LeftBottom())),
colorAndAnimate);
- buffer.emplace_back(pos, right + down,
- glsl::ToVec4(m2::PointD(texRect.RightTop()), m2::PointD(bgTexRect.RightTop())),
+ buffer.emplace_back(pos, right + down + offset,
+ glsl::ToVec4(m2::PointD(texRect.RightTop()),
+ m2::PointD(bgTexRect.RightTop())),
colorAndAnimate);
- buffer.emplace_back(pos, right + up,
- glsl::ToVec4(m2::PointD(texRect.RightBottom()), m2::PointD(bgTexRect.RightBottom())),
+ buffer.emplace_back(pos, right + up + offset,
+ glsl::ToVec4(m2::PointD(texRect.RightBottom()),
+ m2::PointD(bgTexRect.RightBottom())),
colorAndAnimate);
gpu::Program program;