| 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) |
| 29 | { |
| 30 | auto mesh = make_unique_dp<dp::MeshObject>(context, dp::MeshObject::DrawPrimitive::LineStrip, debugName); |
| 31 | mesh->SetBuffer(0 /* bufferInd */, std::move(vertices), static_cast<uint32_t>(sizeof(float) * 2)); |
| 32 | mesh->SetAttribute("a_position", 0 /* bufferInd */, 0 /* offset */, 2 /* componentsCount */); |
| 33 | mesh->Build(context, program); |
| 34 | CHECK(mesh->IsInitialized(), ()); |
| 35 | return mesh; |
| 36 | } |
| 37 | } // namespace |
| 38 | |
| 39 | DebugRectRenderer::DebugRectRenderer(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program, |
no test coverage detected