diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:38:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:38:23 +0000 |
commit | ff6e3c025658a5fa1affd094f220b623e7e1b24b (patch) | |
tree | 9faab72d69c92d24e349d184f5869b9796f17e0c /tools/glsl_preproc/templates.py | |
parent | Initial commit. (diff) | |
download | libplacebo-ff6e3c025658a5fa1affd094f220b623e7e1b24b.tar.xz libplacebo-ff6e3c025658a5fa1affd094f220b623e7e1b24b.zip |
Adding upstream version 6.338.2.upstream/6.338.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/glsl_preproc/templates.py')
-rw-r--r-- | tools/glsl_preproc/templates.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/glsl_preproc/templates.py b/tools/glsl_preproc/templates.py new file mode 100644 index 0000000..b3b6c44 --- /dev/null +++ b/tools/glsl_preproc/templates.py @@ -0,0 +1,14 @@ +import jinja2 +import os.path + +TEMPLATEDIR = os.path.dirname(__file__) + '/templates' +TEMPLATES = jinja2.Environment( + loader = jinja2.FileSystemLoader(searchpath=TEMPLATEDIR), + lstrip_blocks = True, + trim_blocks = True, +) + +GLSL_BLOCK_TEMPLATE = TEMPLATES.get_template('glsl_block.c.j2') +FUNCTION_TEMPLATE = TEMPLATES.get_template('function.c.j2') +CALL_TEMPLATE = TEMPLATES.get_template('call.c.j2') +STRUCT_TEMPLATE = TEMPLATES.get_template('struct.c.j2') |