diff options
Diffstat (limited to 'src/mbgl/gl/vertex_array.cpp')
-rw-r--r-- | src/mbgl/gl/vertex_array.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mbgl/gl/vertex_array.cpp b/src/mbgl/gl/vertex_array.cpp new file mode 100644 index 0000000000..68a500ac45 --- /dev/null +++ b/src/mbgl/gl/vertex_array.cpp @@ -0,0 +1,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 |