blob: a33ee5e4d4bd634f9c3d518321b339fbca788ef8 (
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
|
#pragma once
#include <mbgl/shader/shader.hpp>
#include <mbgl/shader/uniform.hpp>
namespace mbgl {
class SDFShader : public Shader {
public:
SDFShader(gl::GLObjectStore&);
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<std::array<GLfloat, 2>> u_texsize = {"u_texsize", *this};
Uniform<GLfloat> u_buffer = {"u_buffer", *this};
Uniform<GLfloat> u_gamma = {"u_gamma", *this};
Uniform<GLfloat> u_zoom = {"u_zoom", *this};
Uniform<GLint> u_skewed = {"u_skewed", *this};
Uniform<GLint> u_texture = {"u_texture", *this};
Uniform<GLint> u_fadetexture = {"u_fadetexture", *this};
protected:
GLint a_offset = -1;
GLint a_data1 = -1;
GLint a_data2 = -1;
};
class SDFGlyphShader : public SDFShader {
public:
SDFGlyphShader(gl::GLObjectStore& glObjectStore) : SDFShader(glObjectStore) {}
void bind(GLbyte *offset) final;
};
class SDFIconShader : public SDFShader {
public:
SDFIconShader(gl::GLObjectStore& glObjectStore) : SDFShader(glObjectStore) {}
void bind(GLbyte *offset) final;
};
} // namespace mbgl
|