examples: migrate custom-renderer to mach.Core module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
013546b189
commit
27fd19271c
4 changed files with 32 additions and 24 deletions
|
|
@ -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()) {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue