blob: 4b7c0077b3550d0cbe45018771e0cbc7efcab64b (
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()
: 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));
}
|