summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/fill_shader.hpp
blob: 1240b73aa2f3dbc83518096593c7de3e96ca8f25 (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/gl/shader.hpp>
#include <mbgl/gl/attribute.hpp>
#include <mbgl/gl/uniform.hpp>
#include <mbgl/util/color.hpp>

namespace mbgl {

class FillVertex;

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

    using VertexType = FillVertex;

    gl::Attribute<int16_t, 2> a_pos = {"a_pos", *this};

    gl::UniformMatrix<4> u_matrix   = {"u_matrix",  *this};
    gl::Uniform<Color>   u_color    = {"u_color",   *this};
    gl::Uniform<float>   u_opacity  = {"u_opacity", *this};
};

} // namespace mbgl