Skip to content

Commit

Permalink
Update program.py
Browse files Browse the repository at this point in the history
Better #include handling using regex
  • Loading branch information
loreno-heer committed Oct 27, 2023
1 parent f527bc4 commit 4126124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moderngl_window/opengl/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def handle_includes(self, load_source_func, depth=0, source_id=0):
for nr, line in enumerate(self._lines):
line = line.strip()
if line.startswith("#include"):
path = line[9:]
path = re.search(r'#include\s+"?([^"]+)',line)[1]
current_id += 1
_, source = load_source_func(path)
source = ShaderSource(
Expand Down

0 comments on commit 4126124

Please sign in to comment.