summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/box_shader.hpp
blob: 5867a4896d1e43e4f059e2fc65c6dfce9923bcd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <mbgl/shader/shader.hpp>
#include <mbgl/shader/uniform.hpp>
#include <mbgl/gl/gl.hpp>

namespace mbgl {

class CollisionBoxShader : public Shader {
public:
    CollisionBoxShader(gl::GLObjectStore&);

    void bind(GLbyte *offset) final;

    UniformMatrix<4>              u_matrix      = {"u_matrix",      *this};
    Uniform<GLfloat>              u_scale       = {"u_scale",       *this};
    Uniform<GLfloat>              u_zoom        = {"u_zoom",        *this};
    Uniform<GLfloat>              u_maxzoom     = {"u_maxzoom",     *this};

protected:
    GLint a_extrude = -1;
    GLint a_data = -1;
};

} // namespace mbgl