#pragma once

#include <string>
#include <vector>
#include <GL/gl3w.h>

namespace pass {
    /// OpenGL shader
    class Shader {
    public:
        Shader(GLenum type, const std::string &file_path, const std::vector<std::string> &flags = {});
        ~Shader();

        GLuint getId() const {
            return ShaderID;
        }

        static std::string getExt(GLenum type) {
            switch (type) {
            case GL_VERTEX_SHADER:
                return "vs";

            case GL_GEOMETRY_SHADER:
                return "gs";

            case GL_FRAGMENT_SHADER:
                return "fs";

            default:
                return "??";
            }
        }

    private:
        GLuint ShaderID;
    };
}
