summary refs log tree commit diff
path: root/src/Shader/Shader.hpp
blob: 76a11978600a78606250762819838376e63a8189 (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
29
#pragma once

#include <cstdint>
#include "../Assets.hpp"

namespace MC {

class Shader {

public:
    uint32_t get() const {
        return m_shader;
    }

    static Shader create_vertex() {
        return {GL_VERTEX_SHADER, Assets::Shaders::vertex};
    }

    static Shader create_fragment() {
        return {GL_FRAGMENT_SHADER, Assets::Shaders::fragment};
    }

private:
    Shader(uint32_t type, const char* source);

    uint32_t m_shader;
};

}