summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/plain_shader.cpp
blob: 1b5a7819b36c0217e28ac2c4ffb7247db29e0c0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <mbgl/shader/plain_shader.hpp>
#include <mbgl/shader/plain.vertex.hpp>
#include <mbgl/shader/plain.fragment.hpp>
#include <mbgl/gl/gl.hpp>

#include <cstdio>

using namespace mbgl;

PlainShader::PlainShader(gl::GLObjectStore& glObjectStore)
    : Shader("plain", shaders::plain::vertex, shaders::plain::fragment, glObjectStore) {
}

void PlainShader::bind(GLbyte* offset) {
    MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos));
    MBGL_CHECK_ERROR(glVertexAttribPointer(a_pos, 2, GL_SHORT, false, 0, offset));
}