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 /gfx/gl/shader-source.h | |
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 'gfx/gl/shader-source.h')
-rw-r--r-- | gfx/gl/shader-source.h | 20 |
1 files changed, 20 insertions, 0 deletions
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 <GL/glew.h> + +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 |