summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/gl/clipping_mask.cpp
blob: 2c53bc607037c437e180f3057b79920207e8e79e (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED.

#include <mbgl/programs/clipping_mask_program.hpp>
#include <mbgl/programs/gl/preludes.hpp>
#include <mbgl/programs/gl/shader_source.hpp>
#include <mbgl/gl/program.hpp>

namespace mbgl {
namespace programs {
namespace gl {

template <typename>
struct ShaderSource;

template <>
struct ShaderSource<ClippingMaskProgram> {
    static constexpr const char* name = "clipping_mask";
    static constexpr const uint8_t hash[8] = { 0x3e, 0x17, 0xc2, 0x3a, 0x1f, 0xf0, 0xa8, 0xa3 };
    static constexpr const auto vertexOffset = 7891;
    static constexpr const auto fragmentOffset = 7987;
};

constexpr const char* ShaderSource<ClippingMaskProgram>::name;
constexpr const uint8_t ShaderSource<ClippingMaskProgram>::hash[8];

} // namespace gl
} // namespace programs

namespace gfx {

template <>
std::unique_ptr<gfx::Program<ClippingMaskProgram>>
Backend::Create<gfx::Backend::Type::OpenGL>(const ProgramParameters& programParameters) {
    return std::make_unique<gl::Program<ClippingMaskProgram>>(programParameters);
}

} // namespace gfx
} // namespace mbgl

// Uncompressed source of clipping_mask.vertex.glsl:
/*
attribute vec2 a_pos;

uniform mat4 u_matrix;

void main() {
    gl_Position = u_matrix * vec4(a_pos, 0, 1);
}

*/

// Uncompressed source of clipping_mask.fragment.glsl:
/*
void main() {
    gl_FragColor = vec4(1.0);
}

*/