/* * Surface handling for Metal on macOS. */ #include #include #include void *wgpuhs_metal_layer(NSWindow *ns_window) { id metal_layer = NULL; [ns_window.contentView setWantsLayer:YES]; metal_layer = [CAMetalLayer layer]; [ns_window.contentView setLayer:metal_layer]; return metal_layer; }