summaryrefslogtreecommitdiff
path: root/lib/embed-glsl.cpp.m4
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-28 15:42:39 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-28 15:42:39 +0000
commitd63f5ce1cb86e69da28bd74b21e9452dbd88a38f (patch)
tree0c9495f8cb5af05e6068b69d5d57551cc2331a97 /lib/embed-glsl.cpp.m4
parentJust use addLinksBetween (diff)
downloadilt-d63f5ce1cb86e69da28bd74b21e9452dbd88a38f.tar.bz2
ilt-d63f5ce1cb86e69da28bd74b21e9452dbd88a38f.tar.xz
ilt-d63f5ce1cb86e69da28bd74b21e9452dbd88a38f.zip
Move utility to lib
Diffstat (limited to 'lib/embed-glsl.cpp.m4')
-rw-r--r--lib/embed-glsl.cpp.m411
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/embed-glsl.cpp.m4 b/lib/embed-glsl.cpp.m4
new file mode 100644
index 0000000..9e4c6d4
--- /dev/null
+++ b/lib/embed-glsl.cpp.m4
@@ -0,0 +1,11 @@
+changecom()dnl
+// NAME
+#include "substr(TYPE,1)-NAME.h"
+#include <GL/glew.h>
+#include "gfx/gl/shader-source.h"
+
+constexpr const GLchar * src { R"GLSL-EMBED(dnl
+include(SOURCE))GLSL-EMBED" };
+constexpr auto len { constexpr_strlen (src) };
+
+const GLsource NAME`_'substr(TYPE,1) { src, len, GLTYPE };