core: add mach.Core module API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-08 22:54:13 -07:00 committed by Stephen Gutekanst
parent 69b749879d
commit 013546b189
8 changed files with 309 additions and 41 deletions

View file

@ -0,0 +1,20 @@
const std = @import("std");
const mach = @import("mach");
const Game = @import("Game.zig");
// The global list of Mach modules registered for use in our application.
pub const modules = .{
mach.Core,
Game,
};
pub const GPUInterface = mach.core.wgpu.dawn.Interface;
pub fn main() !void {
// Initialize mach.Core
try mach.core.initModule();
// Main loop
while (try mach.core.tick()) {}
}