summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/outlinepattern_shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/shader/outlinepattern_shader.cpp')
-rw-r--r--src/mbgl/shader/outlinepattern_shader.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mbgl/shader/outlinepattern_shader.cpp b/src/mbgl/shader/outlinepattern_shader.cpp
new file mode 100644
index 0000000000..44b76b74c0
--- /dev/null
+++ b/src/mbgl/shader/outlinepattern_shader.cpp
@@ -0,0 +1,21 @@
+#include <mbgl/shader/outlinepattern_shader.hpp>
+#include <mbgl/shader/outlinepattern.vertex.hpp>
+#include <mbgl/shader/outlinepattern.fragment.hpp>
+#include <mbgl/gl/gl.hpp>
+
+#include <cstdio>
+
+using namespace mbgl;
+
+OutlinePatternShader::OutlinePatternShader(gl::GLObjectStore& glObjectStore)
+ : Shader(
+ "outlinepattern",
+ shaders::outlinepattern::vertex, shaders::outlinepattern::fragment,
+ glObjectStore
+ ) {
+}
+
+void OutlinePatternShader::bind(GLbyte *offset) {
+ MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos));
+ MBGL_CHECK_ERROR(glVertexAttribPointer(a_pos, 2, GL_SHORT, false, 0, offset));
+}