mach: update libmach to use new mach/gpu API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
70f9e9eae6
commit
5bd33af68f
1 changed files with 3 additions and 0 deletions
|
|
@ -7,6 +7,8 @@ const native = @import("native.zig");
|
||||||
|
|
||||||
pub const App = @This();
|
pub const App = @This();
|
||||||
|
|
||||||
|
pub const GPUInterface = gpu.dawn.Interface;
|
||||||
|
|
||||||
// Dummy init, deinit, and update functions
|
// Dummy init, deinit, and update functions
|
||||||
pub fn init(_: *App, _: *Core) !void {}
|
pub fn init(_: *App, _: *Core) !void {}
|
||||||
|
|
||||||
|
|
@ -38,6 +40,7 @@ const allocator = gpa.allocator();
|
||||||
// Returns a pointer to a newly allocated Core
|
// Returns a pointer to a newly allocated Core
|
||||||
// Will return a null pointer if an error occurred while initializing Core
|
// Will return a null pointer if an error occurred while initializing Core
|
||||||
pub export fn mach_core_init() ?*Core {
|
pub export fn mach_core_init() ?*Core {
|
||||||
|
gpu.Impl.init();
|
||||||
const core = native.coreInit(allocator) catch {
|
const core = native.coreInit(allocator) catch {
|
||||||
return @intToPtr(?*Core, 0);
|
return @intToPtr(?*Core, 0);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue