From 50089bf9969edb5f10ff552b90620a4882e3c474 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 20 Feb 2021 13:38:38 +0000 Subject: m4 based GLSL embedding Passes a lint check, less mangling, more automation --- gfx/gl/shader-source.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gfx/gl/shader-source.h (limited to 'gfx/gl/shader-source.h') 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 + +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 -- cgit v1.2.3