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

Method UpdateIndexBuffer

libs/drape/mesh_object.cpp:114–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 void UpdateIndexBuffer(ref_ptr<dp::GraphicsContext> context) override
115 {
116 UNUSED_VALUE(context);
117 CHECK(!m_mesh->m_indices.empty(), ());
118 CHECK(m_indexBuffer, ("Index buffer was not created"));
119 GLFunctions::glBindBuffer(m_indexBuffer, gl_const::GLElementArrayBuffer);
120 GLFunctions::glBufferData(gl_const::GLElementArrayBuffer,
121 static_cast<uint32_t>(m_mesh->m_indices.size() * sizeof(uint16_t)),
122 m_mesh->m_indices.data(), gl_const::GLStaticDraw);
123 GLFunctions::glBindBuffer(0, gl_const::GLElementArrayBuffer);
124 }
125
126 void Bind(ref_ptr<dp::GpuProgram> program) override { GLFunctions::glBindVertexArray(m_VAO); }
127

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected