blob: 4f52df59fb1bf2feafa5237decc61d5a728de56d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <mbgl/shader/pattern_shader.hpp>
#include <mbgl/shader/pattern.vertex.hpp>
#include <mbgl/shader/pattern.fragment.hpp>
#include <mbgl/gl/gl.hpp>
#include <cstdio>
using namespace mbgl;
PatternShader::PatternShader(gl::GLObjectStore& glObjectStore)
: Shader(
"pattern",
shaders::pattern::vertex, shaders::pattern::fragment,
glObjectStore
) {
}
void PatternShader::bind(GLbyte *offset) {
MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos));
MBGL_CHECK_ERROR(glVertexAttribPointer(a_pos, 2, GL_SHORT, false, 0, offset));
}
|