| 217 | } |
| 218 | |
| 219 | void MyPosition::CacheSymbol(ref_ptr<dp::GraphicsContext> context, dp::TextureManager::SymbolRegion const & symbol, |
| 220 | dp::RenderState const & state, dp::Batcher & batcher, EMyPositionPart part) |
| 221 | { |
| 222 | m2::RectF const & texRect = symbol.GetTexRect(); |
| 223 | m2::PointF const halfSize = symbol.GetPixelSize() * 0.5f; |
| 224 | |
| 225 | mp::MarkerVertex data[4] = {{glsl::vec2(-halfSize.x, halfSize.y), glsl::ToVec2(texRect.LeftTop())}, |
| 226 | {glsl::vec2(-halfSize.x, -halfSize.y), glsl::ToVec2(texRect.LeftBottom())}, |
| 227 | {glsl::vec2(halfSize.x, halfSize.y), glsl::ToVec2(texRect.RightTop())}, |
| 228 | {glsl::vec2(halfSize.x, -halfSize.y), glsl::ToVec2(texRect.RightBottom())}}; |
| 229 | |
| 230 | dp::AttributeProvider provider(1 /* streamCount */, dp::Batcher::VertexPerQuad); |
| 231 | provider.InitStream(0 /* streamIndex */, mp::GetMarkerBindingInfo(), make_ref(data)); |
| 232 | m_parts[part].first = batcher.InsertTriangleStrip(context, state, make_ref(&provider), nullptr); |
| 233 | ASSERT(m_parts[part].first.IsValid(), ()); |
| 234 | } |
| 235 | |
| 236 | void MyPosition::CachePointPosition(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::TextureManager> mng) |
| 237 | { |
nothing calls this directly
no test coverage detected