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