summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/vertex_array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl/vertex_array.cpp')
-rw-r--r--src/mbgl/gl/vertex_array.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mbgl/gl/vertex_array.cpp b/src/mbgl/gl/vertex_array.cpp
index 0892c3b08b..a73e50ae73 100644
--- a/src/mbgl/gl/vertex_array.cpp
+++ b/src/mbgl/gl/vertex_array.cpp
@@ -1,12 +1,15 @@
#include <mbgl/gl/vertex_array.hpp>
+#include <mbgl/gl/index_buffer.hpp>
#include <mbgl/gl/context.hpp>
namespace mbgl {
namespace gl {
-void VertexArray::bind(Context& context, BufferID indexBuffer, const AttributeBindingArray& bindings) {
+void VertexArray::bind(Context& context,
+ const gfx::IndexBuffer& indexBuffer,
+ const AttributeBindingArray& bindings) {
context.bindVertexArray = state->vertexArray;
- state->indexBuffer = indexBuffer;
+ state->indexBuffer = reinterpret_cast<const gl::IndexBufferResource&>(*indexBuffer.resource).buffer;
state->bindings.reserve(bindings.size());
for (AttributeLocation location = 0; location < bindings.size(); ++location) {