summaryrefslogtreecommitdiff
path: root/gfx/gl/shader-source.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 13:48:31 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 13:59:46 +0000
commitb95cf46bed86e4d0641f7862cfe550af2bc02d60 (patch)
tree2daf2998f6dc3ab6d8761674d8ac107674fc63b7 /gfx/gl/shader-source.h
parentm4 based GLSL embedding (diff)
downloadilt-b95cf46bed86e4d0641f7862cfe550af2bc02d60.tar.bz2
ilt-b95cf46bed86e4d0641f7862cfe550af2bc02d60.tar.xz
ilt-b95cf46bed86e4d0641f7862cfe550af2bc02d60.zip
Remove now redundent Shader::Source class
Moves compile functionality to GLsource.
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