mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
1a85d569e3
This heaves over an inital chunk of code from the Vulkan renderer to execute shaders. The only shader that exists for now is a shader that draws a single texture. We use that to replace the blit op we were doing before.
26 lines
491 B
Python
26 lines
491 B
Python
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import re
|
|
import os
|
|
|
|
loaded_files = []
|
|
|
|
def load (path):
|
|
if (path in loaded_files):
|
|
return
|
|
|
|
loaded_files.append (path)
|
|
|
|
with open(path) as f:
|
|
lines = f.readlines()
|
|
for line in lines:
|
|
match = re.search (r"^#include \"(.*)\"$", line)
|
|
if (match):
|
|
load (os.path.join (os.path.dirname(path), match.group(1)))
|
|
else:
|
|
print (line, end="")
|
|
|
|
load (sys.argv[1])
|
|
|