Correct resize and safer pointers
This commit is contained in:
parent
20835586ab
commit
3b2be83590
9 changed files with 193 additions and 81 deletions
19
make.py
19
make.py
|
|
@ -4,7 +4,7 @@ import os
|
|||
from pathlib import Path
|
||||
import shutil
|
||||
|
||||
from umake import make
|
||||
from umake import get_hash, make
|
||||
|
||||
|
||||
class Config:
|
||||
|
|
@ -31,17 +31,32 @@ class Config:
|
|||
|
||||
def main():
|
||||
def pre_compile():
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
# Compiling vulkan shaders
|
||||
# for shader_path in (
|
||||
# list((Config.SOURCE_DIR / 'uui' / 'vulkan').rglob('*.vert'))
|
||||
# + list((Config.SOURCE_DIR / 'uui' / 'vulkan').rglob('*.frag'))):
|
||||
# out_path = Config.BIN_DIR / shader_path.relative_to(Config.SOURCE_DIR)
|
||||
# if not out_path.parent.exists():
|
||||
# out_path.parent.mkdir(parents=True)
|
||||
# if subprocess.run(['glslc', str(shader_path), '-o', str(out_path) + '.spv']).returncode != 0:
|
||||
# print(f'Error while compiling shader {shader_path}')
|
||||
# return
|
||||
>>>>>>> 675cbbf (Correct resize and safer pointers)
|
||||
# Copying OpenGL shaders
|
||||
src_opengl_shader_path = Config.SOURCE_DIR / 'uui' / 'opengl' / 'shaders'
|
||||
for shader_path in (
|
||||
list(src_opengl_shader_path.rglob('*.vert'))
|
||||
+ list(src_opengl_shader_path.rglob('*.frag'))):
|
||||
out_path = Config.BIN_DIR / shader_path.relative_to(Config.SOURCE_DIR)
|
||||
if out_path.exists() and get_hash(shader_path) == get_hash(out_path):
|
||||
continue
|
||||
if not out_path.parent.exists():
|
||||
out_path.parent.mkdir(parents=True)
|
||||
shutil.copy(shader_path, out_path)
|
||||
|
||||
# Config.PRE_COMPILE_FUNCTION = pre_compile
|
||||
Config.PRE_COMPILE_FUNCTION = pre_compile
|
||||
make(Config)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue