summary refs log tree commit diff
path: root/src/GFX/Shading/Shader.hpp
blob: 21fd89960d27fa3245cddc8ce1493967a394bd31 (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
30
31
32
33
34
#pragma once

#include "../../Common/Sizes.hpp"
#include "../../Assets.hpp"

namespace MC::GFX::Shading {

class Shader {

public:
    enum class Type {
        Vertex,
        Fragment,
    };

    Shader(Type type, const Char* source);

    U32 get() const {
        return m_shader;
    }

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

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

private:
    U32 m_shader;
};

}