summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/linepattern_shader.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-09-26 12:53:32 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-10-05 10:52:19 -0700
commit7a3bef091e7390fa57bf33f1a704c893768b5625 (patch)
treeaf798d879923fd45e763f5dc5449b7e8419aa192 /src/mbgl/shader/linepattern_shader.cpp
parentac8a74ebccb85f83c40b9fccfeb11dc2cb3c79e4 (diff)
downloadqtlocation-mapboxgl-7a3bef091e7390fa57bf33f1a704c893768b5625.tar.gz
[core] Refactor Buffer
Diffstat (limited to 'src/mbgl/shader/linepattern_shader.cpp')
-rw-r--r--src/mbgl/shader/linepattern_shader.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mbgl/shader/linepattern_shader.cpp b/src/mbgl/shader/linepattern_shader.cpp
index 8f755d4140..86f58d9d99 100644
--- a/src/mbgl/shader/linepattern_shader.cpp
+++ b/src/mbgl/shader/linepattern_shader.cpp
@@ -1,7 +1,7 @@
#include <mbgl/shader/linepattern_shader.hpp>
#include <mbgl/shader/linepattern.vertex.hpp>
#include <mbgl/shader/linepattern.fragment.hpp>
-#include <mbgl/gl/gl.hpp>
+#include <mbgl/shader/line_vertex.hpp>
namespace mbgl {
@@ -12,12 +12,9 @@ LinepatternShader::LinepatternShader(gl::Context& context, Defines defines)
context, defines) {
}
-void LinepatternShader::bind(int8_t* offset) {
- MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos));
- MBGL_CHECK_ERROR(glVertexAttribPointer(a_pos, 2, GL_SHORT, false, 8, offset + 0));
-
- MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_data));
- MBGL_CHECK_ERROR(glVertexAttribPointer(a_data, 4, GL_UNSIGNED_BYTE, false, 8, offset + 4));
+void LinepatternShader::bind(const gl::VertexBuffer<LineVertex>&,
+ const int8_t* offset) {
+ LineVertex::bind(offset);
}
} // namespace mbgl