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

#include <cstdio>

using namespace mbgl;

RasterShader::RasterShader(gl::GLObjectStore& glObjectStore)
    : Shader("raster", shaders::raster::vertex, shaders::raster::fragment, glObjectStore) {
}

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