summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/context.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-10-29 14:51:07 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-11-08 08:09:28 -0800
commit36210fe4e9c68a52dedc90548d90e77cf39a2228 (patch)
treebe6f8e5c84f98094a372fc7518a5384fd37563bc /src/mbgl/gl/context.cpp
parent687ee1e1c92275f65469412591ff262b46e7ccd9 (diff)
downloadqtlocation-mapboxgl-36210fe4e9c68a52dedc90548d90e77cf39a2228.tar.gz
[core] Make attribute binding more similar to uniform binding
Diffstat (limited to 'src/mbgl/gl/context.cpp')
-rw-r--r--src/mbgl/gl/context.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index c63819bc03..f23dfe3dbe 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -486,17 +486,7 @@ void Context::draw(const Drawable& drawable) {
if (needAttributeBindings()) {
vertexBuffer = drawable.vertexBuffer;
elementBuffer = drawable.indexBuffer;
-
- for (const auto& binding : drawable.attributeBindings) {
- MBGL_CHECK_ERROR(glEnableVertexAttribArray(binding.location));
- MBGL_CHECK_ERROR(glVertexAttribPointer(
- binding.location,
- binding.count,
- static_cast<GLenum>(binding.type),
- GL_FALSE,
- static_cast<GLsizei>(drawable.vertexSize),
- reinterpret_cast<GLvoid*>(binding.offset + (drawable.vertexSize * segment.vertexOffset))));
- }
+ drawable.bindAttributes(segment.vertexOffset);
}
if (drawable.indexBuffer) {