Introduce pipeline, shader sketch

This commit is contained in:
2025-02-11 21:11:25 +01:00
parent 4c381f5e77
commit 88e2e58228
9 changed files with 376 additions and 3 deletions

View File

@@ -21,6 +21,28 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const pipeline_debug = b.option(bool, "pipeline_debug", "Build asset pipeline in debug mode") orelse false;
const pipeline_mod = b.createModule(.{
.root_source_file = b.path("pipeline/main.zig"),
.target = b.graph.host,
.optimize = if (pipeline_debug) .Debug else .ReleaseSafe,
});
pipeline_mod.addImport("zstbi", zstbi.module("root"));
const pipeline = b.addExecutable(.{
.name = "pipeline",
.root_module = pipeline_mod,
});
pipeline.linkLibrary(zstbi.artifact("zstbi"));
const pipeline_cmd = b.addRunArtifact(pipeline);
pipeline_cmd.setCwd(b.path("."));
const pipeline_step = b.step("pipeline", "Run the asset pipeline");
pipeline_step.dependOn(&pipeline_cmd.step);
const exe_mod = b.createModule(.{
.root_source_file = b.path("src/main.zig"),