#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; static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::string_view errorMessage); private: const std::basic_string_view text; GLuint type; bool lookups; };