metal: disable v-sync

This commit is contained in:
Mitchell Hashimoto
2022-10-31 10:25:49 -07:00
parent 1d1f161b03
commit 20adaa7b66

View File

@ -136,6 +136,10 @@ pub fn init(alloc: Allocator, font_group: *font.GroupCache) !Metal {
const swapchain = CAMetalLayer.msgSend(objc.Object, objc.sel("layer"), .{});
swapchain.setProperty("device", device.value);
swapchain.setProperty("opaque", true);
// disable v-sync
swapchain.setProperty("displaySyncEnabled", false);
break :swapchain swapchain;
};