summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/fill_vertex.hpp
blob: 86b83d28e565d83fe1ab8de6fad3087cb5475f3f (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/gl/attribute.hpp>

#include <vector>
#include <cstdint>

namespace mbgl {

class FillVertex {
public:
    FillVertex(int16_t x, int16_t y)
        : a_pos { x, y } {}

    const int16_t a_pos[2];
};

namespace gl {

template <class Shader>
struct AttributeBindings<Shader, FillVertex> {
    std::vector<AttributeBinding> operator()(const Shader& shader) {
        return {{
            MBGL_MAKE_ATTRIBUTE_BINDING(FillVertex, shader, a_pos)
        }};
    };
};

} // namespace gl
} // namespace mbgl