summaryrefslogtreecommitdiff
path: root/src/mbgl/shader/shader.hpp
blob: b3d9b4e46cccdbb41ab9c1b0f65463c79d41cc38 (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
#ifndef MBGL_RENDERER_SHADER
#define MBGL_RENDERER_SHADER

#include <cstdint>
#include <array>
#include <string>
#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;
    uint32_t program;

    inline uint32_t getID() const {
        return program;
    }

private:
    bool compileShader(uint32_t *shader, uint32_t type, const char *source);
};

}

#endif