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

Method SetBuffer

libs/drape/mesh_object.hpp:51–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50 template <typename T>
51 void SetBuffer(uint32_t bufferInd, std::vector<T> && vertices, uint32_t stride = 0)
52 {
53 CHECK_LESS_OR_EQUAL(bufferInd, GetNextBufferIndex(), ());
54
55 if (bufferInd == GetNextBufferIndex())
56 m_buffers.emplace_back(make_unique_dp<VertexBuffer<T>>(std::move(vertices), stride));
57 else
58 m_buffers[bufferInd] = make_unique_dp<VertexBuffer<T>>(std::move(vertices), stride);
59
60 Reset();
61 }
62
63 void SetAttribute(std::string const & attributeName, uint32_t bufferInd, uint32_t offset, uint32_t componentsCount,
64 glConst type = gl_const::GLFloatType);

Callers 3

RenderMethod · 0.80
Arrow3dMethod · 0.80
CreateMeshFunction · 0.80

Calls 1

emplace_backMethod · 0.45

Tested by

no test coverage detected