summaryrefslogtreecommitdiff
path: root/lib/embed-glsl.cpp.m4
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-21 01:34:10 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-21 01:34:10 +0000
commitd4ae68b6ba5211c7bc11a52951c466c5050ae377 (patch)
treede9d06beede1d7baaf868b6f6c32d3e3c90c5fb3 /lib/embed-glsl.cpp.m4
parentFix includes in test glCtxtBhvr (diff)
downloadilt-d4ae68b6ba5211c7bc11a52951c466c5050ae377.tar.bz2
ilt-d4ae68b6ba5211c7bc11a52951c466c5050ae377.tar.xz
ilt-d4ae68b6ba5211c7bc11a52951c466c5050ae377.zip
String view/constexpr Shader instances
Gonna need more constexpr stuff and strstr/strlen aren't that
Diffstat (limited to 'lib/embed-glsl.cpp.m4')
-rw-r--r--lib/embed-glsl.cpp.m49
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/embed-glsl.cpp.m4 b/lib/embed-glsl.cpp.m4
index 60fb56b..9fe0b41 100644
--- a/lib/embed-glsl.cpp.m4
+++ b/lib/embed-glsl.cpp.m4
@@ -1,12 +1,9 @@
changecom() dnl
// NAME
#include "gfx/gl/shader.h"
-#include "lib/strlen.h"
#include "substr(TYPE,1)-NAME.h"
#include <glad/gl.h>
- constexpr const GLchar * src {R"GLSL-EMBED(dnl
-include(SOURCE))GLSL-EMBED"};
-constexpr auto len {constexpr_strlen(src)};
-
-const Shader NAME`_'substr(TYPE,1) { src, len, GLTYPE };
+constexpr Shader NAME`_'substr(TYPE,1) {
+ R"GLSL-EMBED(dnl
+ include(SOURCE))GLSL-EMBED", GLTYPE };