diff options
Diffstat (limited to 'gfx/gl/shader.h')
-rw-r--r-- | gfx/gl/shader.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h index c6b45af..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<GLchar>; using ShaderRef = glRef<GLuint, &glCreateShader, &glDeleteShader>; constexpr Shader(const GLchar * text, GLuint type) : @@ -15,10 +16,13 @@ public: } [[nodiscard]] ShaderRef compile() const; - static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::string_view errorMessage); + + [[nodiscard]] static GLint getShaderParam(GLuint shader, GLenum pname); private: - const std::basic_string_view<GLchar> text; + void checkShaderError(GLuint shader) const; + + const Source text; GLuint type; bool lookups; }; |