summaryrefslogtreecommitdiff
path: root/gfx/gl/shader-source.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/shader-source.h')
-rw-r--r--gfx/gl/shader-source.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gfx/gl/shader-source.h b/gfx/gl/shader-source.h
index 4fbbe5b..9403e80 100644
--- a/gfx/gl/shader-source.h
+++ b/gfx/gl/shader-source.h
@@ -2,11 +2,16 @@
#define SHADER_SOURCE_H
#include <GL/glew.h>
+#include <glRef.hpp>
struct GLsource {
+ using ShaderRef = glRef<GLuint, __glewCreateShader, __glewDeleteShader>;
+
const GLchar * text;
GLint len;
GLuint type;
+
+ [[nodiscard]] ShaderRef compile() const;
};
constexpr auto