diff options
Diffstat (limited to 'utility')
-rw-r--r-- | utility/embed-glsl.cpp.m4 | 10 | ||||
-rw-r--r-- | utility/embed-glsl.h.m4 | 4 |
2 files changed, 14 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 }; diff --git a/utility/embed-glsl.h.m4 b/utility/embed-glsl.h.m4 new file mode 100644 index 0000000..918007b --- /dev/null +++ b/utility/embed-glsl.h.m4 @@ -0,0 +1,4 @@ +// NAME +#include <gfx/gl/shader-source.h> + +extern const GLsource NAME`_'substr(TYPE,1); |