summaryrefslogtreecommitdiff
path: root/gfx/gl/shader.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-08-03 12:23:54 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-08-03 12:23:54 +0100
commit969999f9858043d2a2053f93209f878a3eb5a02a (patch)
treee9007eeb149c588a0d3a82b2a8da3f8d5aa63b6b /gfx/gl/shader.h
parentCreating a program with no shaders is not valid (diff)
downloadilt-969999f9858043d2a2053f93209f878a3eb5a02a.tar.bz2
ilt-969999f9858043d2a2053f93209f878a3eb5a02a.tar.xz
ilt-969999f9858043d2a2053f93209f878a3eb5a02a.zip
Split CheckShaderError into shader/program versions
They're similar, but need splitting for better diagnostics
Diffstat (limited to 'gfx/gl/shader.h')
-rw-r--r--gfx/gl/shader.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h
index c6b45af..1e4a2ee 100644
--- a/gfx/gl/shader.h
+++ b/gfx/gl/shader.h
@@ -15,10 +15,12 @@ public:
}
[[nodiscard]] ShaderRef compile() const;
- static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::string_view errorMessage);
private:
- const std::basic_string_view<GLchar> text;
+ using Source = std::basic_string_view<GLchar>;
+
+ void checkShaderError(GLuint shader, GLuint flag, std::string_view errorMessage) const;
+ const Source text;
GLuint type;
bool lookups;
};