summaryrefslogtreecommitdiff
path: root/src/mbgl/gl
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-12-09 17:13:01 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-12-13 09:42:46 -0800
commitc12b52c6a7c90e3135712bcb99fa4b0904701295 (patch)
treed34a5fa8f8547982d42bc2abed1354adddc5e3cb /src/mbgl/gl
parent36616c7200d51e2fd66b00c9c66bb3a83ba5a880 (diff)
downloadqtlocation-mapboxgl-c12b52c6a7c90e3135712bcb99fa4b0904701295.tar.gz
[core] Fix debug rendering
* Off-by-one in DebugBucket indexing * Must unbind VAO before binding index buffer in Context::createIndexBuffer
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r--src/mbgl/gl/context.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index e4cc5e0fe3..5048ffcd66 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -105,6 +105,7 @@ UniqueBuffer Context::createIndexBuffer(const void* data, std::size_t size) {
BufferID id = 0;
MBGL_CHECK_ERROR(glGenBuffers(1, &id));
UniqueBuffer result { std::move(id), { this } };
+ vertexArrayObject = 0;
elementBuffer = result;
MBGL_CHECK_ERROR(glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, data, GL_STATIC_DRAW));
return result;