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

Method BindBuffers

libs/drape/vertex_array_buffer.cpp:78–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 void Unbind() override { GLFunctions::glBindVertexArray(0); }
77
78 void BindBuffers(BuffersMap const & buffers) const override
79 {
80 for (auto it = buffers.begin(); it != buffers.end(); ++it)
81 {
82 BindingInfo const & binding = it->first;
83 ref_ptr<DataBuffer> buffer = make_ref(it->second);
84 buffer->GetBuffer()->Bind();
85
86 for (uint16_t i = 0; i < binding.GetCount(); ++i)
87 {
88 BindingDecl const & decl = binding.GetBindingDecl(i);
89 int8_t attributeLocation = m_program->GetAttributeLocation(decl.m_attributeName);
90 assert(attributeLocation != -1);
91 GLFunctions::glEnableVertexAttribute(attributeLocation);
92 GLFunctions::glVertexAttributePointer(attributeLocation, decl.m_componentCount, decl.m_componentType, false,
93 decl.m_stride, decl.m_offset);
94 }
95 }
96 }
97
98 void RenderRange(ref_ptr<GraphicsContext> context, bool drawAsLine, IndicesRange const & range) override
99 {

Callers

nothing calls this directly

Calls 7

make_refFunction · 0.85
GetAttributeLocationMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
BindMethod · 0.45
GetBufferMethod · 0.45
GetCountMethod · 0.45

Tested by

no test coverage detected