Now import COMPILED shaders, not raw

This commit is contained in:
duck
2025-04-24 17:02:05 +05:00
parent 6a8cbbf70b
commit 89e0649efe

View File

@@ -30,6 +30,9 @@ pub fn build(b: *std.Build) void {
for (SHADERS) |shader_path| {
const glslc = b.addSystemCommand(&.{"glslc"});
if (optimize != .Debug) {
glslc.addArg("-O");
}
const ext = std.fs.path.extension(shader_path);
if (std.mem.eql(u8, ext, "vert")) {
@@ -46,6 +49,7 @@ pub fn build(b: *std.Build) void {
}
const run_cmd = b.addRunArtifact(exe);
run_cmd.setCwd(b.path(std.fs.path.relative(b.allocator, b.build_root.path.?, b.exe_dir) catch unreachable));
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);