diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-26 12:53:32 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-10-05 10:52:19 -0700 |
commit | 7a3bef091e7390fa57bf33f1a704c893768b5625 (patch) | |
tree | af798d879923fd45e763f5dc5449b7e8419aa192 /src/mbgl/shader/raster_shader.cpp | |
parent | ac8a74ebccb85f83c40b9fccfeb11dc2cb3c79e4 (diff) | |
download | qtlocation-mapboxgl-7a3bef091e7390fa57bf33f1a704c893768b5625.tar.gz |
[core] Refactor Buffer
Diffstat (limited to 'src/mbgl/shader/raster_shader.cpp')
-rw-r--r-- | src/mbgl/shader/raster_shader.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mbgl/shader/raster_shader.cpp b/src/mbgl/shader/raster_shader.cpp index 8133b396c6..f3909bb2ac 100644 --- a/src/mbgl/shader/raster_shader.cpp +++ b/src/mbgl/shader/raster_shader.cpp @@ -1,7 +1,7 @@ #include <mbgl/shader/raster_shader.hpp> #include <mbgl/shader/raster.vertex.hpp> #include <mbgl/shader/raster.fragment.hpp> -#include <mbgl/gl/gl.hpp> +#include <mbgl/shader/raster_vertex.hpp> namespace mbgl { @@ -12,14 +12,9 @@ RasterShader::RasterShader(gl::Context& context, Defines defines) context, defines) { } -void RasterShader::bind(int8_t* offset) { - const GLint stride = 8; - - MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos)); - MBGL_CHECK_ERROR(glVertexAttribPointer(a_pos, 2, GL_SHORT, false, stride, offset)); - - MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_texture_pos)); - MBGL_CHECK_ERROR(glVertexAttribPointer(a_texture_pos, 2, GL_SHORT, false, stride, offset + 4)); +void RasterShader::bind(const gl::VertexBuffer<RasterVertex>&, + const int8_t* offset) { + RasterVertex::bind(offset); } } // namespace mbgl |