Rebase fixes

This commit is contained in:
r.kuznetsov 2016-01-08 17:03:59 +03:00 committed by Constantin Shalnev
parent e2e5fc4c7f
commit 4d31757f36
3 changed files with 15 additions and 6 deletions

View file

@ -4,6 +4,7 @@ attribute vec4 a_color;
uniform mat4 modelView;
uniform mat4 projection;
uniform mat4 pivotTransform;
#ifdef SAMSUNG_GOOGLE_NEXUS
uniform sampler2D u_colorTex;
@ -16,11 +17,17 @@ varying vec4 v_color;
void main(void)
{
vec3 radius = a_normal * a_position.z;
// Here we intentionally decrease precision of 'pos' calculation
// to eliminate jittering effect in process of billboard reconstruction.
lowp vec4 pos = vec4(a_position.xy, 0, 1) * modelView;
highp vec4 shiftedPos = vec4(radius.xy, 0, 0) + pos;
gl_Position = shiftedPos * projection;
vec4 finalPos = shiftedPos * projection;
float w = finalPos.w;
finalPos.xyw = (pivotTransform * vec4(finalPos.xy, 0.0, w)).xyw;
finalPos.z *= finalPos.w / w;
gl_Position = finalPos;
v_radius = radius;
v_color = a_color;

View file

@ -62,7 +62,7 @@ dp::BindingInfo const & GetGpsTrackDynamicBindingInfo()
} // namespace
GpsTrackHandle::GpsTrackHandle(size_t pointsCount)
: OverlayHandle(FeatureID(), dp::Anchor::Center, 0)
: OverlayHandle(FeatureID(), dp::Anchor::Center, 0, false)
, m_needUpdate(false)
{
m_buffer.resize(pointsCount * dp::Batcher::VertexPerQuad);
@ -101,15 +101,17 @@ bool GpsTrackHandle::IndexesRequired() const
return false;
}
m2::RectD GpsTrackHandle::GetPixelRect(ScreenBase const & screen) const
m2::RectD GpsTrackHandle::GetPixelRect(ScreenBase const & screen, bool perspective) const
{
UNUSED_VALUE(screen);
UNUSED_VALUE(perspective);
return m2::RectD();
}
void GpsTrackHandle::GetPixelShape(ScreenBase const & screen, Rects & rects) const
void GpsTrackHandle::GetPixelShape(ScreenBase const & screen, Rects & rects, bool perspective) const
{
UNUSED_VALUE(screen);
UNUSED_VALUE(perspective);
}
void GpsTrackHandle::SetPoint(size_t index, m2::PointD const & position,

View file

@ -52,8 +52,8 @@ public:
void GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutator,
ScreenBase const & screen) const override;
bool Update(ScreenBase const & screen) override;
m2::RectD GetPixelRect(ScreenBase const & screen) const override;
void GetPixelShape(ScreenBase const & screen, Rects & rects) const override;
m2::RectD GetPixelRect(ScreenBase const & screen, bool perspective) const override;
void GetPixelShape(ScreenBase const & screen, Rects & rects, bool perspective) const override;
bool IndexesRequired() const override;
void Clear();