diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-20 13:38:38 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-20 13:38:38 +0000 |
commit | 50089bf9969edb5f10ff552b90620a4882e3c474 (patch) | |
tree | 4742cf02f21bdfd2c8a7b58c8726734b8ce7aeb0 /utility/embed-glsl.cpp.m4 | |
parent | Pass a cppcheck (diff) | |
download | ilt-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 'utility/embed-glsl.cpp.m4')
-rw-r--r-- | utility/embed-glsl.cpp.m4 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/utility/embed-glsl.cpp.m4 b/utility/embed-glsl.cpp.m4 new file mode 100644 index 0000000..febba68 --- /dev/null +++ b/utility/embed-glsl.cpp.m4 @@ -0,0 +1,10 @@ +changecom()dnl +// NAME +#include "substr(TYPE,1)-NAME.h" +#include <cstring> + +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 }; |