Files
zig-experiments/src/nu/Render.zig
2024-07-09 15:17:26 -04:00

41 lines
874 B
Zig

//! Isolate vulkan code (except for ImGui) through this module.
//!
//! Requires that Window module already be initialized.
const std = @import("std");
const builtin = @import("builtin");
const vk = @import("vk");
const au = @import("Render/au.zig");
pub const Options = struct {
app_name: [*:0]const u8 = "nu-au-app",
app_version: struct {
variant: u3 = 0,
major: u7 = 0,
minor: u10 = 0,
patch: u12 = 0,
} = .{},
engine_name: [*:0]const u8 = "nu-au",
engine_version: struct {
variant: u3 = 0,
major: u7 = 0,
minor: u10 = 0,
patch: u12 = 0,
} = .{},
frames_in_flight: u8 = 3,
};
pub fn init(alloc: std.mem.Allocator) !void {
// todo make ctx not globals
try au.init(alloc);
errdefer au.deinit();
}
pub fn frame() void {}
pub fn deinit() void {
au.deinit();
}