summaryrefslogtreecommitdiff
path: root/src/geometry/static_vertex_buffer.cpp
blob: c86211c50f001eb3ac4f377e32533a565f5fcbd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <mbgl/geometry/static_vertex_buffer.hpp>
#include <mbgl/platform/gl.hpp>

namespace mbgl {

StaticVertexBuffer::StaticVertexBuffer(std::initializer_list<std::pair<int16_t, int16_t>> init) {
    for (const std::pair<int16_t, int16_t> &vertex : init) {
        vertex_type *vertices = static_cast<vertex_type *>(addElement());
        vertices[0] = vertex.first;
        vertices[1] = vertex.second;
    }
}

}