#pragma once #include #include #include #include class Shader { public: using ShaderRef = glRef; constexpr Shader(const GLchar * text, GLint len, GLuint type) : text {text}, len {len}, type {type} { } [[nodiscard]] ShaderRef compile() const; static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::string_view errorMessage); private: const GLchar * text; GLint len; GLuint type; };