darwin: first pass at trying to enable vsync

This commit is contained in:
foxnne 2024-12-06 11:06:37 -06:00 committed by Emi Gutekanst
parent 6ef58d8c1f
commit 0a78c4cc08
3 changed files with 15 additions and 5 deletions

View file

@ -31,6 +31,7 @@ pub fn init(
const window = try core.windows.new(.{
.title = "core-transparent-window",
.vsync_mode = .triple,
});
// Store our render pipeline in our module's state, so we can access it later on.
@ -153,7 +154,7 @@ pub fn tick(app: *App, core: *mach.Core) void {
app.title_timer.reset();
// TODO(object): window-title
// try updateWindowTitle(core);
core.windows.set(app.window, .title, std.fmt.allocPrintZ(core.allocator, "core-custom-entrypoint [ {d}fps ] [ Input {d}hz ]", .{ core.frame.rate, core.input.rate }) catch unreachable);
}
if (app.color_time >= 4.0 or app.color_time <= 0.0) {