examples: move core examples into core/ folder; add triangle example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
1b448dd02a
commit
4ac8de4692
7 changed files with 180 additions and 3 deletions
15
examples/core/triangle/main.zig
Normal file
15
examples/core/triangle/main.zig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const mach = @import("mach");
|
||||
|
||||
// The global list of Mach modules registered for use in our application.
|
||||
pub const modules = .{
|
||||
mach.Core,
|
||||
@import("App.zig"),
|
||||
};
|
||||
|
||||
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