Function SDL_Metal_CreateView
pub unsafe extern "C" fn SDL_Metal_CreateView(
window: *mut SDL_Window,
) -> *mut c_void
Available on crate feature
dep_sdl3
only.Expand description
Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window.
On macOS, this does not associate a MTLDevice with the CAMetalLayer on its own. It is up to user code to do that.
The returned handle can be casted directly to a NSView or UIView. To access
the backing CAMetalLayer, call SDL_Metal_GetLayer()
.
§Parameters
window
: the window.
§Return value
Returns handle NSView or UIView.
§Availability
This function is available since SDL 3.2.0.