summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/vertex_array.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-03-05 16:07:58 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-03-06 16:12:51 +0100
commit4737a45383911fcddf93f0a33e7e25246a5da07e (patch)
treea41a32f4d05297ede3c6d685cabf81a0f6dadcdc /src/mbgl/gl/vertex_array.cpp
parentf13c2b86e427e29a856ca8f0f79379203c61f431 (diff)
downloadqtlocation-mapboxgl-4737a45383911fcddf93f0a33e7e25246a5da07e.tar.gz
[core] move IndexBuffer to gfx namespace
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) {