blob: 254b01b6b6d08281d4cf551927504a54e83f4fb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <mbgl/geometry/static_vertex_buffer.hpp>
#include <mbgl/gl/gl.hpp>
namespace mbgl {
StaticVertexBuffer::StaticVertexBuffer(std::initializer_list<std::pair<int16_t, int16_t>> init) {
for (const auto& vertex : init) {
vertex_type *vertices = static_cast<vertex_type *>(addElement());
vertices[0] = vertex.first;
vertices[1] = vertex.second;
}
}
} // namespace mbgl
|