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