summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/raster_shader.cpp
blob: aaf0bfd2a57dae35ed61824ae08aaef606dff03b (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/platform/gl.hpp>

#include <cstdio>

using namespace mbgl;

RasterShader::RasterShader()
    : Shader("raster", shaders::raster::vertex, shaders::raster::fragment) {
}

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