summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/vertex_array.cpp
blob: 68a500ac454c3770a7d3885bd4747f4b11eebdde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <mbgl/gl/vertex_array.hpp>
#include <mbgl/gl/context.hpp>
#include <mbgl/gl/gl.hpp>

namespace mbgl {
namespace gl {

void VertexArray::bind(Context& context, BufferID indexBuffer, const AttributeBindingArray& bindings) {
    context.bindVertexArray = state->vertexArray;
    state->indexBuffer = indexBuffer;

    for (AttributeLocation location = 0; location < MAX_ATTRIBUTES; ++location) {
        state->bindings[location] = bindings[location];
    }
}

} // namespace gl
} // namespace mbgl