summary refs log tree commit diff
path: root/src/Shader/Shader.hpp
blob: 75c4f14fabe21d029f2917eb9c4b68496b64fd1b (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 "ShaderSources.hpp"

namespace MC {

class Shader {

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

    static Shader create_vertex() {
        return {GL_VERTEX_SHADER, ShaderSources::vertex_shader};
    }

    static Shader create_fragment() {
        return {GL_FRAGMENT_SHADER, ShaderSources::fragment_shader};
    }

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

    uint32_t m_shader;
};

}