diff options
Diffstat (limited to 'src/mbgl/shader/shader.hpp')
-rw-r--r-- | src/mbgl/shader/shader.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mbgl/shader/shader.hpp b/src/mbgl/shader/shader.hpp new file mode 100644 index 0000000000..27e831a510 --- /dev/null +++ b/src/mbgl/shader/shader.hpp @@ -0,0 +1,28 @@ +#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 *name, const char *vertex, const char *fragment); + ~Shader(); + const char *name; + bool valid; + uint32_t program; + + inline uint32_t getID() const { + return program; + } + +private: + bool compileShader(uint32_t *shader, uint32_t type, const char *source); +}; + +} + +#endif |