summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/line_shader.hpp
blob: 4a6d86381c5da5c69508fa13cceffbd02ed5db94 (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
26
27
28
29
30
#pragma once

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

namespace mbgl {

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

    void bind(GLbyte *offset) final;

    UniformMatrix<4>                 u_matrix    = {"u_matrix",    *this};
    UniformMatrix<4>                 u_exmatrix  = {"u_exmatrix",  *this};
    Uniform<std::array<GLfloat, 4>>  u_color     = {"u_color",     *this};
    Uniform<GLfloat>                 u_opacity   = {"u_opacity",   *this};
    Uniform<std::array<GLfloat, 2>>  u_linewidth = {"u_linewidth", *this};
    Uniform<GLfloat>                 u_ratio     = {"u_ratio",     *this};
    Uniform<GLfloat>                 u_blur      = {"u_blur",      *this};
    Uniform<GLfloat>                 u_extra     = {"u_extra",     *this};
    Uniform<GLfloat>                 u_offset    = {"u_offset",    *this};
    UniformMatrix<2>                 u_antialiasingmatrix  = {"u_antialiasingmatrix",  *this};

private:
    GLint a_data = -1;
};


} // namespace mbgl