#pragma once #include #include #include #include class Shader { public: using ShaderRef = glRef; constexpr Shader(const GLchar * text, GLuint type) : text {text}, type {type}, lookups {ctre::search(this->text)} { } [[nodiscard]] ShaderRef compile() const; private: using Source = std::basic_string_view; void checkShaderError(GLuint shader, GLuint flag, std::string_view errorMessage) const; const Source text; GLuint type; bool lookups; };