[drape] new depth layers names and creation of OverlayHandle for Circle and PoiSymbol

This commit is contained in:
ExMix 2014-04-04 13:00:13 +03:00 committed by Alex Zolotarev
parent 0ed7f82905
commit 1283f93e52
6 changed files with 13 additions and 8 deletions

View file

@ -151,7 +151,7 @@ UNIT_TEST(BatchLists_Test)
EXPECTGL(glDeleteProgram(ProgramID));
}
GLState state(0, 0);
GLState state(0, GLState::GeometryLayer);
BindingInfo binding(1);
BindingDecl & decl = binding.GetBindingDecl(0);

View file

@ -20,7 +20,7 @@ RefPointer<VertexArrayBuffer> RenderBucket::GetBuffer()
void RenderBucket::AddOverlayHandle(TransferPointer<OverlayHandle> handle)
{
m_overlay.push_back(MasterPointer<OverlayHandle>(handle));
}
void RenderBucket::InsertUniform(TransferPointer<UniformValue> uniform)

View file

@ -18,7 +18,7 @@ namespace df
void AreaShape::Draw(RefPointer<Batcher> batcher, RefPointer<TextureSetHolder> /*textures*/) const
{
GLState state(gpu::SOLID_AREA_PROGRAM, 0);
GLState state(gpu::SOLID_AREA_PROGRAM, GLState::GeometryLayer);
state.SetColor(m_params.m_color);
AttributeProvider provider(1, m_vertexes.size());

View file

@ -52,7 +52,7 @@ namespace df
AddPoint(stream, i + 1, m_pt.x, m_pt.y, m_params.m_depth, rotatedNormal.x, rotatedNormal.y);
}
GLState state(gpu::SOLID_SHAPE_PROGRAM, 0);
GLState state(gpu::SOLID_SHAPE_PROGRAM, GLState::OverlayLayer);
state.SetColor(m_params.m_color);
AttributeProvider provider(1, TriangleCount + 2);
@ -71,7 +71,10 @@ namespace df
normalDecl.m_offset = 3 * sizeof(float);
normalDecl.m_stride = 5 * sizeof(float);
OverlayHandle * overlay = new OverlayHandle(OverlayHandle::Center, m_pt,
m2::PointD(m_params.m_radius, m_params.m_radius));
provider.InitStream(0, info, MakeStackRefPointer<void>(&stream[0]));
batcher->InsertTriangleFan(state, MakeStackRefPointer(&provider));
batcher->InsertTriangleFan(state, MakeStackRefPointer(&provider), MovePointer(overlay));
}
}

View file

@ -195,7 +195,7 @@ namespace df
}
//
GLState state(gpu::SOLID_LINE_PROGRAM, 0);
GLState state(gpu::SOLID_LINE_PROGRAM, GLState::GeometryLayer);
state.SetColor(GetColor());
AttributeProvider provider(3, renderPoints.size());

View file

@ -20,7 +20,7 @@ namespace df
TextureSetHolder::TextureRegion region;
textures->GetSymbolRegion(m_params.m_symbolName, region);
GLState state(gpu::TEXTURING_PROGRAM, 0);
GLState state(gpu::TEXTURING_PROGRAM, GLState::OverlayLayer);
state.SetTextureSet(region.m_textureSet);
state.SetBlending(Blending(true));
@ -61,7 +61,9 @@ namespace df
texDecl.m_offset = (3 + 2) * sizeof(float);
texDecl.m_stride = 8 * sizeof(float);
OverlayHandle * handle = new OverlayHandle(OverlayHandle::Center, m_pt, region.m_pixelSize);
provider.InitStream(0, info, MakeStackRefPointer<void>(stream));
batcher->InsertTriangleStrip(state, MakeStackRefPointer(&provider));
batcher->InsertTriangleStrip(state, MakeStackRefPointer(&provider), MovePointer(handle));
}
}