From 979c226bdcd7904db5bd23dfbf526de4c040f436 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 21 Jan 2024 02:39:30 +0000 Subject: Look for and replace GL_XXX with fixed string --- gfx/gl/shader.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gfx/gl/shader.h') diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h index cc1bbc0..c6b45af 100644 --- a/gfx/gl/shader.h +++ b/gfx/gl/shader.h @@ -3,12 +3,16 @@ #include #include #include +#include class Shader { public: using ShaderRef = glRef; - constexpr Shader(const GLchar * text, GLuint type) : text {text}, type {type} { } + 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); @@ -16,4 +20,5 @@ public: private: const std::basic_string_view text; GLuint type; + bool lookups; }; -- cgit v1.2.3