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.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