summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/context.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-11-21 13:03:31 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-12-01 08:57:11 -0800
commit54c557d982c92caefd53a68e2f72bba822101c2c (patch)
tree09f97a8afea5c4bd92238ab196722006214c8a3b /src/mbgl/gl/context.cpp
parentb1068b432ee17c14ea756b7c48be4c955303de95 (diff)
downloadqtlocation-mapboxgl-54c557d982c92caefd53a68e2f72bba822101c2c.tar.gz
[core] Use indexed rendering everywhere
Diffstat (limited to 'src/mbgl/gl/context.cpp')
-rw-r--r--src/mbgl/gl/context.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index 4c469d7f67..e4cc5e0fe3 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -518,18 +518,11 @@ void Context::draw(const Drawable& drawable) {
drawable.bindAttributes(segment.vertexOffset);
}
- if (drawable.indexBuffer) {
- MBGL_CHECK_ERROR(glDrawElements(
- static_cast<GLenum>(primitiveType),
- static_cast<GLsizei>(segment.indexLength),
- GL_UNSIGNED_SHORT,
- reinterpret_cast<GLvoid*>(sizeof(uint16_t) * segment.indexOffset)));
- } else {
- MBGL_CHECK_ERROR(glDrawArrays(
- static_cast<GLenum>(primitiveType),
- static_cast<GLint>(segment.vertexOffset),
- static_cast<GLsizei>(segment.vertexLength)));
- }
+ MBGL_CHECK_ERROR(glDrawElements(
+ static_cast<GLenum>(primitiveType),
+ static_cast<GLsizei>(segment.indexLength),
+ GL_UNSIGNED_SHORT,
+ reinterpret_cast<GLvoid*>(sizeof(uint16_t) * segment.indexOffset)));
}
}