#ifndef DIGGLER_RENDER_GL_SHADER_HPP #define DIGGLER_RENDER_GL_SHADER_HPP #include #include #include "OpenGL.hpp" namespace Diggler { namespace Render { namespace gl { class Shader { private: GLuint id; const std::vector *m_preludeLines; public: enum class Type : unsigned int { FRAGMENT = static_cast(GL_FRAGMENT_SHADER), VERTEX = static_cast(GL_VERTEX_SHADER) } type; Shader(Type type); Shader(Type type, const std::string& path); ~Shader(); void setPreludeLines(const std::vector&); bool compileFromFile(const std::string& path); bool compileFromString(const std::string& source, const std::string& path = ""); std::string getError() const; GLuint getId() const; operator GLuint() const { return getId(); } }; } } } #endif /* DIGGLER_RENDER_GL_SHADER_HPP */