aboutsummaryrefslogtreecommitdiff
path: root/include/RenderBackend/OpenGL/Shader.hpp
blob: 0f802ec6d585c7e5a0cfe5b19acd632814b97968 (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
#pragma once

#include "../../Result.hpp"
#include "../../utils.hpp"
#include "../../types.hpp"
#include <memory>

namespace amalgine {
    class Shader
    {
        DISABLE_COPY(Shader)
        friend class ShaderProgram;
    public:
        enum class Type {
            VERTEX,
            PIXEL
        };

        ~Shader();

        static Result<std::unique_ptr<Shader>> compile(Type type, const char *str, int size);
        const u32 id;
    private:
        Shader(u32 shader_id);
    };
}