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/mbgl/shader/icon_shader.hpp | |
parent | c1a64dc5fa73b54cc5de77629781dfc74302a1e7 (diff) | |
download | qtlocation-mapboxgl-4ea281c750c5afcc68f2832bb42d98a1cbce6735.tar.gz |
rename llmr => mbgl
Diffstat (limited to 'include/mbgl/shader/icon_shader.hpp')
-rw-r--r-- | include/mbgl/shader/icon_shader.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/mbgl/shader/icon_shader.hpp b/include/mbgl/shader/icon_shader.hpp new file mode 100644 index 0000000000..b97b3c2be3 --- /dev/null +++ b/include/mbgl/shader/icon_shader.hpp @@ -0,0 +1,42 @@ +#ifndef MBGL_SHADER_SHADER_ICON +#define MBGL_SHADER_SHADER_ICON + +#include <mbgl/shader/shader.hpp> + +namespace mbgl { + +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 |