diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-07-16 18:53:56 -0700 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-07-16 18:53:56 -0700 |
commit | 4ea281c750c5afcc68f2832bb42d98a1cbce6735 (patch) | |
tree | 60bc7d3ccba2c54859e2e023997cc027cc67aea7 /include/llmr/shader | |
parent | c1a64dc5fa73b54cc5de77629781dfc74302a1e7 (diff) | |
download | qtlocation-mapboxgl-4ea281c750c5afcc68f2832bb42d98a1cbce6735.tar.gz |
rename llmr => mbgl
Diffstat (limited to 'include/llmr/shader')
-rw-r--r-- | include/llmr/shader/composite_shader.hpp | 29 | ||||
-rw-r--r-- | include/llmr/shader/dot_shader.hpp | 33 | ||||
-rw-r--r-- | include/llmr/shader/gaussian_shader.hpp | 29 | ||||
-rw-r--r-- | include/llmr/shader/icon_shader.hpp | 42 | ||||
-rw-r--r-- | include/llmr/shader/line_shader.hpp | 45 | ||||
-rw-r--r-- | include/llmr/shader/linejoin_shader.hpp | 37 | ||||
-rw-r--r-- | include/llmr/shader/outline_shader.hpp | 29 | ||||
-rw-r--r-- | include/llmr/shader/pattern_shader.hpp | 45 | ||||
-rw-r--r-- | include/llmr/shader/plain_shader.hpp | 26 | ||||
-rw-r--r-- | include/llmr/shader/raster_shader.hpp | 33 | ||||
-rw-r--r-- | include/llmr/shader/shader.hpp | 29 | ||||
-rw-r--r-- | include/llmr/shader/text_shader.hpp | 72 |
12 files changed, 0 insertions, 449 deletions
diff --git a/include/llmr/shader/composite_shader.hpp b/include/llmr/shader/composite_shader.hpp deleted file mode 100644 index 31156485c4..0000000000 --- a/include/llmr/shader/composite_shader.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef LLMR_SHADER_COMPOSITE_SHADER -#define LLMR_SHADER_COMPOSITE_SHADER - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class CompositeShader : public Shader { -public: - CompositeShader(); - - void bind(char *offset); - - void setImage(int32_t image); - void setOpacity(float opacity); - -private: - int32_t a_pos = -1; - - int32_t image = 0; - int32_t u_image = -1; - - float opacity = 0; - int32_t u_opacity = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/dot_shader.hpp b/include/llmr/shader/dot_shader.hpp deleted file mode 100644 index 5e817c09c1..0000000000 --- a/include/llmr/shader/dot_shader.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef LLMR_SHADER_SHADER_DOT -#define LLMR_SHADER_SHADER_DOT - -#include <llmr/shader/shader.hpp> - -namespace llmr { - - class DotShader : public Shader { - public: - DotShader(); - - void bind(char *offset); - - void setColor(const std::array<float, 4>& color); - void setSize(float size); - void setBlur(float blur); - - private: - int32_t a_pos = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; - - float size = 0; - int32_t u_size = -1; - - float blur = 0; - int32_t u_blur = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/gaussian_shader.hpp b/include/llmr/shader/gaussian_shader.hpp deleted file mode 100644 index c3589c1534..0000000000 --- a/include/llmr/shader/gaussian_shader.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef LLMR_RENDERER_SHADER_GAUSSIAN -#define LLMR_RENDERER_SHADER_GAUSSIAN - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class GaussianShader : public Shader { -public: - GaussianShader(); - - void bind(char *offset); - - void setImage(int32_t image); - void setOffset(const std::array<float, 2>& offset); - -private: - int32_t a_pos = -1; - - int32_t image = 0; - int32_t u_image = -1; - - std::array<float, 2> offset = {{}}; - int32_t u_offset = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/icon_shader.hpp b/include/llmr/shader/icon_shader.hpp deleted file mode 100644 index daf37b374a..0000000000 --- a/include/llmr/shader/icon_shader.hpp +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef LLMR_SHADER_SHADER_ICON -#define LLMR_SHADER_SHADER_ICON - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class IconShader : public Shader { -public: - IconShader(); - - void bind(char *offset); - - void setImage(int32_t image); - void setColor(const std::array<float, 4>& color); - void setDimension(const std::array<float, 2>& dimension); - void setSize(float size); - void setRatio(float ratio); - -private: - int32_t a_pos = -1; - int32_t a_tex = -1; - - int32_t image = -1; - int32_t u_image = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; - - std::array<float, 2> dimension = {{}}; - int32_t u_dimension = -1; - - float size = 0; - int32_t u_size = -1; - - float ratio = 0; - int32_t u_ratio = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/line_shader.hpp b/include/llmr/shader/line_shader.hpp deleted file mode 100644 index 234c70a649..0000000000 --- a/include/llmr/shader/line_shader.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef LLMR_SHADER_SHADER_LINE -#define LLMR_SHADER_SHADER_LINE - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class LineShader : public Shader { -public: - LineShader(); - - void bind(char *offset); - - void setExtrudeMatrix(const std::array<float, 16>& exmatrix); - void setColor(const std::array<float, 4>& color); - void setLineWidth(const std::array<float, 2>& linewidth); - void setRatio(float ratio); - void setDashArray(const std::array<float, 2>& dasharray); - void setDebug(float debug); - -private: - int32_t a_pos = -1; - int32_t a_extrude = -1; - int32_t a_linesofar = -1; - - std::array<float, 16> exmatrix = {{}}; - int32_t u_exmatrix = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; - - std::array<float, 2> linewidth = {{}}; - int32_t u_linewidth = -1; - - float ratio = 0; - int32_t u_ratio = -1; - - std::array<float, 2> dasharray = {{}}; - int32_t u_dasharray = -1; -}; - - -} - -#endif diff --git a/include/llmr/shader/linejoin_shader.hpp b/include/llmr/shader/linejoin_shader.hpp deleted file mode 100644 index 82ec3b59aa..0000000000 --- a/include/llmr/shader/linejoin_shader.hpp +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef LLMR_SHADER_SHADER_LINEJOIN -#define LLMR_SHADER_SHADER_LINEJOIN - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class LinejoinShader : public Shader { -public: - LinejoinShader(); - - void bind(char *offset); - - void setColor(const std::array<float, 4>& color); - void setWorld(const std::array<float, 2>& world); - void setLineWidth(const std::array<float, 2>& linewidth); - void setSize(float size); - -private: - int32_t a_pos = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; - - std::array<float, 2> world = {{}}; - int32_t u_world = -1; - - std::array<float, 2> linewidth = {{}}; - int32_t u_linewidth = -1; - - float size = 0; - int32_t u_size = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/outline_shader.hpp b/include/llmr/shader/outline_shader.hpp deleted file mode 100644 index 5b52b30054..0000000000 --- a/include/llmr/shader/outline_shader.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef LLMR_SHADER_SHADER_OUTLINE -#define LLMR_SHADER_SHADER_OUTLINE - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class OutlineShader : public Shader { -public: - OutlineShader(); - - void bind(char *offset); - - void setColor(const std::array<float, 4>& color); - void setWorld(const std::array<float, 2>& world); - -private: - int32_t a_pos = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; - - std::array<float, 2> world = {{}}; - int32_t u_world = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/pattern_shader.hpp b/include/llmr/shader/pattern_shader.hpp deleted file mode 100644 index d0142ebca4..0000000000 --- a/include/llmr/shader/pattern_shader.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef LLMR_SHADER_SHADER_PATTERN -#define LLMR_SHADER_SHADER_PATTERN - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class PatternShader : public Shader { -public: - PatternShader(); - - void bind(char *offset); - - void setColor(const std::array<float, 4>& color); - void setOffset(const std::array<float, 2>& offset); - void setPatternSize(const std::array<float, 2>& pattern_size); - void setPatternTopLeft(const std::array<float, 2>& pattern_tl); - void setPatternBottomRight(const std::array<float, 2>& pattern_br); - void setMix(float mix); - -private: - int32_t a_pos = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; - - std::array<float, 2> offset = {{}}; - int32_t u_offset = -1; - - std::array<float, 2> pattern_size = {{}}; - int32_t u_pattern_size = -1; - - std::array<float, 2> pattern_tl = {{}}; - int32_t u_pattern_tl = -1; - - std::array<float, 2> pattern_br = {{}}; - int32_t u_pattern_br = -1; - - float mix = 0; - int32_t u_mix = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/plain_shader.hpp b/include/llmr/shader/plain_shader.hpp deleted file mode 100644 index bf768f8845..0000000000 --- a/include/llmr/shader/plain_shader.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef LLMR_SHADER_SHADER_PLAIN -#define LLMR_SHADER_SHADER_PLAIN - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class PlainShader : public Shader { -public: - PlainShader(); - - void bind(char *offset); - - void setColor(float r, float g, float b, float a); - void setColor(const std::array<float, 4>& color); - -private: - int32_t a_pos = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/raster_shader.hpp b/include/llmr/shader/raster_shader.hpp deleted file mode 100644 index adc945e460..0000000000 --- a/include/llmr/shader/raster_shader.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef LLMR_RENDERER_SHADER_RASTER -#define LLMR_RENDERER_SHADER_RASTER - -#include <llmr/shader/shader.hpp> - -namespace llmr { - -class RasterShader : public Shader { -public: - RasterShader(); - - void bind(char *offset); - - void setImage(int32_t image); - void setOpacity(float opacity); - void setBuffer(float buffer); - -private: - int32_t a_pos = -1; - - int32_t image = 0; - int32_t u_image = -1; - - float opacity = 0; - int32_t u_opacity = -1; - - float buffer = 0; - int32_t u_buffer = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/shader.hpp b/include/llmr/shader/shader.hpp deleted file mode 100644 index f4713c59f6..0000000000 --- a/include/llmr/shader/shader.hpp +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef LLMR_RENDERER_SHADER -#define LLMR_RENDERER_SHADER - -#include <cstdint> -#include <array> -#include <llmr/util/noncopyable.hpp> - -namespace llmr { - -class Shader : private util::noncopyable { -public: - Shader(const char *vertex, const char *fragment); - ~Shader(); - bool valid; - uint32_t program; - - void setMatrix(const std::array<float, 16>& matrix); - -private: - bool compileShader(uint32_t *shader, uint32_t type, const char *source); - -protected: - std::array<float, 16> matrix = {{}}; - int32_t u_matrix = -1; -}; - -} - -#endif diff --git a/include/llmr/shader/text_shader.hpp b/include/llmr/shader/text_shader.hpp deleted file mode 100644 index d232ef9a0c..0000000000 --- a/include/llmr/shader/text_shader.hpp +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef LLMR_SHADER_TEXT_SHADER -#define LLMR_SHADER_TEXT_SHADER - -#include "shader.hpp" - -namespace llmr { - -class TextShader : public Shader { -public: - TextShader(); - - void bind(char *offset); - - void setColor(float r, float g, float b, float a); - void setColor(const std::array<float, 4> &color); - void setBuffer(float buffer); - void setGamma(float gamma); - void setExtrudeMatrix(const std::array<float, 16> &exmatrix); - void setAngle(float angle); - void setZoom(float zoom); - void setFlip(float flip); - void setFadeDist(float fadedist); - void setMinFadeZoom(float minfadezoom); - void setMaxFadeZoom(float maxfadezoom); - void setFadeZoom(float fadezoom); - void setTextureSize(const std::array<float, 2> &texsize); - -private: - int32_t a_pos = -1; - int32_t a_offset = -1; - int32_t a_data1 = -1; - int32_t a_data2 = -1; - - std::array<float, 4> color = {{}}; - int32_t u_color = -1; - - float buffer = 0.0f; - int32_t u_buffer = -1; - - float gamma = 0.0f; - int32_t u_gamma = -1; - - std::array<float, 16> exmatrix = {{}}; - int32_t u_exmatrix = -1; - - float angle = 0.0f; - int32_t u_angle = -1; - - float zoom = 0.0f; - int32_t u_zoom = -1; - - float flip = 0.0f; - int32_t u_flip = -1; - - float fadedist = 0.0f; - int32_t u_fadedist = -1; - - float minfadezoom = 0.0f; - int32_t u_minfadezoom = -1; - - float maxfadezoom = 0.0f; - int32_t u_maxfadezoom = -1; - - float fadezoom = 0.0f; - int32_t u_fadezoom = -1; - - std::array<float, 2> texsize = {{}}; - int32_t u_texsize = -1; -}; -} - -#endif |