xcb: add Vulkan init to sample

This commit is contained in:
2026-09-04 16:38:58 +02:00
parent 94c08ff3b6
commit c14fc89c74
5 changed files with 35921 additions and 2 deletions

View File

@@ -4,6 +4,14 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const vulkan_dep = b.dependency("vulkan_zig", .{
.target = target,
.optimize = optimize,
.registry = b.path("vendor/vk.xml"),
});
const vulkan_mod = vulkan_dep.module("vulkan-zig");
const mod = b.addModule("xcb", .{
.root_source_file = b.path("src/root.zig"),
.target = target,
@@ -27,6 +35,7 @@ pub fn build(b: *std.Build) void {
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "vulkan", .module = vulkan_mod },
.{ .name = "xcb", .module = mod },
},
});