core: add Null backend to show what implementing a backend looks like
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
c32e763e11
commit
6e2f937026
3 changed files with 169 additions and 4 deletions
|
|
@ -17,11 +17,9 @@ const Platform = switch (build_options.core_platform) {
|
|||
.wayland => @import("core/Wayland.zig"),
|
||||
.web => @panic("TODO: revive wasm backend"),
|
||||
.win32 => @import("core/win32.zig"),
|
||||
.null => @import("core/Null.zig"),
|
||||
};
|
||||
|
||||
// TODO(important): mach.core has a lot of standard Zig APIs, and some global variables, which are
|
||||
// part of its old API design. We should elevate them into this module instead.
|
||||
|
||||
pub const name = .mach_core;
|
||||
|
||||
pub const Mod = mach.Mod(@This());
|
||||
|
|
@ -246,7 +244,7 @@ pub inline fn deinit(entities: *mach.Entities.Mod, core: *Mod) !void {
|
|||
{
|
||||
deinitLinuxGamemode();
|
||||
}
|
||||
|
||||
|
||||
state.platform.deinit();
|
||||
state.swap_chain.release();
|
||||
state.queue.release();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue