diff options
author | Bradley Clemetson <brad.clemetson@codeprogrammers.net> | 2023-03-19 21:01:58 -0700 |
---|---|---|
committer | Bradley Clemetson <brad.clemetson@codeprogrammers.net> | 2023-03-19 21:18:52 -0700 |
commit | 2302c7102fce093ed7cbbcda86bfcfebf1fe4fd5 (patch) | |
tree | 0fd368cfb777c18b9d0e29e3b0cc942e76142269 /gles3_builders.py | |
parent | 550a7798510810d238b733a54f69da71b2a2d152 (diff) | |
download | redot-engine-2302c7102fce093ed7cbbcda86bfcfebf1fe4fd5.tar.gz |
Allow for external python scripts to call the build python headers via external scripts
Change GLES3 to not use a relative path
Make the parameters more explicit and ensure the shaders generated are not using relative paths
Diffstat (limited to 'gles3_builders.py')
-rw-r--r-- | gles3_builders.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gles3_builders.py b/gles3_builders.py index 0d0037dea1..6b5a53221c 100644 --- a/gles3_builders.py +++ b/gles3_builders.py @@ -199,11 +199,21 @@ def include_file_in_gles3_header(filename: str, header_data: GLES3HeaderStruct, return header_data -def build_gles3_header(filename: str, include: str, class_suffix: str, header_data: Optional[GLES3HeaderStruct] = None): +def build_gles3_header( + filename: str, + include: str, + class_suffix: str, + optional_output_filename: str = None, + header_data: Optional[GLES3HeaderStruct] = None, +): header_data = header_data or GLES3HeaderStruct() include_file_in_gles3_header(filename, header_data, 0) - out_file = filename + ".gen.h" + if optional_output_filename is None: + out_file = filename + ".gen.h" + else: + out_file = optional_output_filename + fd = open(out_file, "w") defspec = 0 defvariant = "" |