summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/context.cpp
diff options
context:
space:
mode:
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) {