mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-07-09 01:11:58 +00:00
Remove glsl file is fixing it fails
This commit is contained in:
parent
0e8938429f
commit
e6202d87c3
1 changed files with 6 additions and 2 deletions
|
|
@ -441,11 +441,15 @@ def fixup_opengl_code(glsl_code: str, path: str) -> tuple[str, dict[str, Any]]:
|
|||
|
||||
|
||||
def fixup_opengl_files(*paths: str) -> None:
|
||||
' Convert the GLSL output of slangc to something that will work with OpenGL 3.3 '
|
||||
' Convert the GLSL output of slangc to something that will work with OpenGL 3.1 '
|
||||
for path in paths:
|
||||
with open(path, 'r+') as f:
|
||||
glsl_code = f.read()
|
||||
fixed, metadata = fixup_opengl_code(glsl_code, path)
|
||||
try:
|
||||
fixed, metadata = fixup_opengl_code(glsl_code, path)
|
||||
except Exception:
|
||||
os.unlink(path)
|
||||
raise
|
||||
f.seek(0)
|
||||
f.truncate()
|
||||
f.write(fixed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue