From 89e0649efebaabe3f6a8ffd4ef0b8cb9131fe421 Mon Sep 17 00:00:00 2001 From: duck Date: Thu, 24 Apr 2025 17:02:05 +0500 Subject: [PATCH] Now import COMPILED shaders, not raw --- build.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.zig b/build.zig index 56ab01d..fbddd91 100644 --- a/build.zig +++ b/build.zig @@ -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);