| 16 | namespace |
| 17 | { |
| 18 | void PixelPointToScreenSpace(ScreenBase const & screen, m2::PointF const & pt, std::vector<float> & buffer) |
| 19 | { |
| 20 | auto const szX = static_cast<float>(screen.PixelRectIn3d().SizeX()); |
| 21 | auto const szY = static_cast<float>(screen.PixelRectIn3d().SizeY()); |
| 22 | |
| 23 | buffer.push_back(2.0f * (pt.x / szX - 0.5f)); |
| 24 | buffer.push_back(2.0f * (-pt.y / szY + 0.5f)); |
| 25 | } |
| 26 | |
| 27 | drape_ptr<dp::MeshObject> CreateMesh(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program, |
| 28 | std::vector<float> && vertices, std::string const & debugName) |