examples: migrate custom-renderer to mach.Core module API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-08 22:57:21 -07:00 committed by Stephen Gutekanst
parent 013546b189
commit 27fd19271c
4 changed files with 32 additions and 24 deletions

View file

@ -1,13 +1,23 @@
const mach = @import("mach");
const std = @import("std");
const mach = @import("mach");
const Renderer = @import("Renderer.zig");
const Game = @import("Game.zig");
// The global list of Mach modules registered for use in our application.
pub const modules = .{
mach.Engine,
mach.Core,
Renderer,
Game,
};
pub const App = mach.App;
pub const GPUInterface = mach.core.wgpu.dawn.Interface;
// TODO: move this to a mach "entrypoint" zig module
pub fn main() !void {
// Initialize mach core
try mach.core.initModule();
// Main loop
while (try mach.core.tick()) {}
}