sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Metal.Unsafe

Synopsis

Documentation

sDL_Metal_CreateView Source #

Arguments

:: Ptr SDL_Window
window
the 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 at SDL3/SDL_metal.h 75:43

Since: 3.2.0

sDL_Metal_DestroyView Source #

Arguments

:: SDL_MetalView
view
the SDL_MetalView object.
-> 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 at SDL3/SDL_metal.h 91:34

Since: 3.2.0

sDL_Metal_GetLayer Source #

Arguments

:: SDL_MetalView
view
the SDL_MetalView object.
-> 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 at SDL3/SDL_metal.h 103:36

Since: 3.2.0