tiawl / spaceporn

Wiki and Generator for space contemplators
MIT License
18 stars 1 forks source link

Replace glslc with shaderc module #151

Closed tiawl closed 5 months ago

tiawl commented 5 months ago

Replace glslc system call in build.zig by a shaderc module and calls to this library to compile shaders without external dependencies. This issues depends of of:

tiawl commented 5 months ago

How to use C external library into build.zig:

https://ziggit.dev/t/is-this-possible-to-use-a-c-external-library-into-a-build-zig/3884

Solution: Uses two independent executables into the build.zig. A first one is installed and executed before the second one. The first executable uses the C extern library to compile shaders and the second one (the app which uses the compiled shaders) is built and executed in a second time. At least shaders are not compiled during the runtime of the main app.