Skip to content

Commit

Permalink
Shorter build out_file
Browse files Browse the repository at this point in the history
  • Loading branch information
skilletfunastralab committed Oct 11, 2024
1 parent 91b405a commit 8f0b347
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions gles3_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,7 @@ def build_gles3_header(
header_data = header_data or GLES3HeaderStruct()
include_file_in_gles3_header(filename, header_data, 0)

if optional_output_filename is None:
out_file = filename + ".gen.h"
else:
out_file = optional_output_filename
out_file = optional_output_filename or filename + ".gen.h"

with open(out_file, "w", encoding="utf-8", newline="\n") as fd:
defspec = 0
Expand Down
10 changes: 2 additions & 8 deletions glsl_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ def build_rd_header(
header_data = header_data or RDHeaderStruct()
include_file_in_rd_header(filename, header_data, 0)

if optional_output_filename is None:
out_file = filename + ".gen.h"
else:
out_file = optional_output_filename
out_file = optional_output_filename or filename + ".gen.h"

out_file_base = out_file
out_file_base = out_file_base[out_file_base.rfind("/") + 1 :]
Expand Down Expand Up @@ -180,10 +177,7 @@ def build_raw_header(
header_data = header_data or RAWHeaderStruct()
include_file_in_raw_header(filename, header_data, 0)

if optional_output_filename is None:
out_file = filename + ".gen.h"
else:
out_file = optional_output_filename
out_file = optional_output_filename or filename + ".gen.h"

out_file_base = out_file.replace(".glsl.gen.h", "_shader_glsl")
out_file_base = out_file_base[out_file_base.rfind("/") + 1 :]
Expand Down

0 comments on commit 8f0b347

Please sign in to comment.