blob: d0b9c511b5652bc7daf3b32974959d75535dd702 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/usr/bin/env python
from subprocess import PIPE,run
def validate(pth:str):
print("validating \"",pth,"\"... ",end='',sep='')
pth = "bowshock/shader/" + pth + ".glsl"
prog = "glslangValidator"
stat = run([prog,pth],stdout=PIPE)
ret = stat.returncode
if ret != 0x0:
print("\x1B[38;5;161merror\x1B[0m")
print()
print(stat.stdout.decode("utf-8"))
quit(0x1)
print("\x1B[38;5;77mokay\x1B[0m")
if __name__ == "__main__":
print("validating shaders...")
shaders = [
"main.frag",
"main.vert",
]
for shader in shaders:
validate(shader)
print("success")
|