| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Metal.Unsafe
Synopsis
- sDL_Metal_CreateView :: Ptr SDL_Window -> IO SDL_MetalView
- sDL_Metal_DestroyView :: SDL_MetalView -> IO ()
- sDL_Metal_GetLayer :: SDL_MetalView -> IO (Ptr Void)
Documentation
Arguments
| :: Ptr SDL_Window |
|
| -> IO SDL_MetalView |
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().
- Returns
- handle NSView or UIView.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_Metal_DestroyView,sDL_Metal_GetLayer- C declaration
SDL_Metal_CreateView, defined atSDL3/SDL_metal.h 75:43
Since: 3.2.0
sDL_Metal_DestroyView Source #
Arguments
| :: SDL_MetalView |
|
| -> IO () |
Destroy an existing SDL_MetalView object.
This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was called after SDL_CreateWindow.
- Thread safety
- This function should only be called on the main thread.
- See also
sDL_Metal_CreateView- C declaration
SDL_Metal_DestroyView, defined atSDL3/SDL_metal.h 91:34
Since: 3.2.0
Arguments
| :: SDL_MetalView |
|
| -> IO (Ptr Void) |
Get a pointer to the backing CAMetalLayer for the given view.
- Returns
- a pointer.
- Thread safety
- This function should only be called on the main thread.
- C declaration
SDL_Metal_GetLayer, defined atSDL3/SDL_metal.h 103:36
Since: 3.2.0