summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/outline_shader.hpp
blob: 09fa9431c9123fa525827b3a592b8a6b926436e4 (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
#pragma once

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

namespace mbgl {

namespace gl {
template <class> class VertexBuffer;
} // namespace gl

class PlainVertex;

class OutlineShader : public Shader {
public:
    OutlineShader(gl::Context&, Defines defines = None);

    void bind(const gl::VertexBuffer<PlainVertex>&,
              const int8_t* offset);

    UniformMatrix<4>              u_matrix         = {"u_matrix",        *this};
    Uniform<Color>                u_outline_color  = {"u_outline_color", *this};
    Uniform<float>                u_opacity        = {"u_opacity",       *this};
    Uniform<std::array<float, 2>> u_world          = {"u_world",         *this};
};

} // namespace mbgl