From 3fe690f2d64c4e8ce525da1c9732b7f3aa6fe370 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 4 Aug 2024 13:10:15 +0100 Subject: Specific exception for shader compile error Outputs more details, including shader source --- gfx/gl/shader.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gfx/gl/shader.h') diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h index 1e4a2ee..ce97734 100644 --- a/gfx/gl/shader.h +++ b/gfx/gl/shader.h @@ -7,6 +7,7 @@ class Shader { public: + using Source = std::basic_string_view; using ShaderRef = glRef; constexpr Shader(const GLchar * text, GLuint type) : @@ -16,10 +17,11 @@ public: [[nodiscard]] ShaderRef compile() const; + [[nodiscard]] static GLint getShaderParam(GLuint shader, GLenum pname); + private: - using Source = std::basic_string_view; + void checkShaderError(GLuint shader) const; - void checkShaderError(GLuint shader, GLuint flag, std::string_view errorMessage) const; const Source text; GLuint type; bool lookups; -- cgit v1.2.3