mach: Create binding methods for all glfw methods in use and update
examples
This commit is contained in:
parent
9106a9839d
commit
8b46f46cf8
11 changed files with 62 additions and 24 deletions
|
|
@ -3,6 +3,7 @@ const Allocator = std.mem.Allocator;
|
|||
const glfw = @import("glfw");
|
||||
const gpu = @import("gpu");
|
||||
const App = @import("app");
|
||||
const structs = @import("structs.zig");
|
||||
const enums = @import("enums.zig");
|
||||
|
||||
pub const VSyncMode = enum {
|
||||
|
|
@ -71,6 +72,18 @@ timer: std.time.Timer,
|
|||
pub const Core = struct {
|
||||
internal: GetCoreInternalType(),
|
||||
|
||||
pub fn setShouldClose(core: *Core, value: bool) void {
|
||||
core.internal.setShouldClose(value);
|
||||
}
|
||||
|
||||
pub fn getFramebufferSize(core: *Core) !structs.Size {
|
||||
return core.internal.getFramebufferSize();
|
||||
}
|
||||
|
||||
pub fn setSizeLimits(core: *Core, min: structs.SizeOptional, max: structs.SizeOptional) !void {
|
||||
return core.internal.setSizeLimits(min, max);
|
||||
}
|
||||
|
||||
pub fn setKeyCallback(core: *Core, comptime cb: fn (app: *App, engine: *Engine, key: enums.Key, action: enums.Action) void) void {
|
||||
core.internal.setKeyCallback(cb);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue