MCPcopy Create free account
hub / github.com/comaps/comaps / CreateMesh

Function CreateMesh

libs/drape_frontend/debug_rect_renderer.cpp:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27drape_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
39DebugRectRenderer::DebugRectRenderer(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::GpuProgram> program,

Callers 2

SetArrowMethod · 0.85
SetRectMethod · 0.85

Calls 4

SetBufferMethod · 0.80
SetAttributeMethod · 0.45
BuildMethod · 0.45
IsInitializedMethod · 0.45

Tested by

no test coverage detected