diff options
Diffstat (limited to 'gfx/gl/shader.h')
-rw-r--r-- | gfx/gl/shader.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h index 1a8ddef..a20636d 100644 --- a/gfx/gl/shader.h +++ b/gfx/gl/shader.h @@ -7,15 +7,14 @@ class Shader { public: + using ShaderRef = glRef<GLuint, &__glewCreateShader, &__glewDeleteShader>; constexpr Shader(const GLchar * text, GLint len, GLuint type) : text {text}, len {len}, type {type} { } - operator GLuint() const; + ShaderRef compile() const; static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, std::string_view errorMessage); private: - using ShaderRef = glRef<GLuint, &__glewCreateShader, &__glewDeleteShader>; const GLchar * text; GLint len; GLuint type; - mutable std::optional<ShaderRef> shader {}; }; |