summaryrefslogtreecommitdiff
path: root/gfx/gl/shader-source.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 13:38:38 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-20 13:38:38 +0000
commit50089bf9969edb5f10ff552b90620a4882e3c474 (patch)
tree4742cf02f21bdfd2c8a7b58c8726734b8ce7aeb0 /gfx/gl/shader-source.h
parentPass a cppcheck (diff)
downloadilt-50089bf9969edb5f10ff552b90620a4882e3c474.tar.bz2
ilt-50089bf9969edb5f10ff552b90620a4882e3c474.tar.xz
ilt-50089bf9969edb5f10ff552b90620a4882e3c474.zip
m4 based GLSL embedding
Passes a lint check, less mangling, more automation
Diffstat (limited to 'gfx/gl/shader-source.h')
-rw-r--r--gfx/gl/shader-source.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gfx/gl/shader-source.h b/gfx/gl/shader-source.h
new file mode 100644
index 0000000..4fbbe5b
--- /dev/null
+++ b/gfx/gl/shader-source.h
@@ -0,0 +1,20 @@
+#ifndef SHADER_SOURCE_H
+#define SHADER_SOURCE_H
+
+#include <GL/glew.h>
+
+struct GLsource {
+ const GLchar * text;
+ GLint len;
+ GLuint type;
+};
+
+constexpr auto
+constexpr_strlen(const GLchar * const s)
+{
+ auto e {s};
+ while (*++e) { }
+ return e - s;
+}
+
+#endif