Begin new Asset Pipeline

This commit is contained in:
2025-11-21 13:02:32 +01:00
parent bbafc55f6f
commit 63a8eee18c
34 changed files with 1190 additions and 586 deletions

View File

@@ -5,10 +5,10 @@ const stbi = @import("zstbi");
const vk = @import("vulkan");
const c = @import("const.zig");
const game = @import("game.zig");
const Engine = @import("engine/Engine.zig");
const Swapchain = @import("engine/Swapchain.zig");
const Game = @import("Game.zig");
pub var allocator: std.mem.Allocator = undefined;
pub var temp_allocator: std.mem.Allocator = undefined;
@@ -54,12 +54,18 @@ pub fn main() !void {
var swapchain = try Swapchain.init(&engine);
defer swapchain.deinit();
//game.init();
//defer game.deinit();
var game = try Game.init(allocator, &swapchain);
defer game.deinit();
var t1 = glfw.getTime();
while (!window.shouldClose()) {
glfw.pollEvents();
//game.update(dt);
const t2 = glfw.getTime();
const dt: f32 = @floatCast(t2 - t1);
t1 = t2;
game.update(dt);
std.Thread.sleep(1 * std.time.ns_per_ms);
}
}