core: add mach.Core module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
69b749879d
commit
013546b189
8 changed files with 309 additions and 41 deletions
20
examples/core-custom-entrypoint/main.zig
Normal file
20
examples/core-custom-entrypoint/main.zig
Normal 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()) {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue