|
SDL3pp
A slim C++ wrapper for SDL3
|
Semi-safe reference for MetalView.


Public Member Functions | |
| MetalViewRef (MetalViewParam resource) noexcept | |
| Constructs from MetalViewParam. More... | |
| MetalViewRef (MetalViewRaw resource) noexcept | |
| Constructs from MetalViewParam. More... | |
| constexpr | MetalViewRef (const MetalViewRef &other) noexcept=default |
| Copy constructor. | |
| ~MetalViewRef () | |
| Destructor. | |
| constexpr | MetalView (std::nullptr_t=nullptr) noexcept |
| Default ctor. | |
| constexpr | MetalView (const MetalViewRaw resource) noexcept |
| Constructs from MetalViewParam. More... | |
| constexpr | MetalView (const MetalView &other) noexcept=default |
| Copy constructor. | |
| constexpr | MetalView (MetalView &&other) noexcept |
| Move constructor. | |
| constexpr | MetalView (const MetalViewRef &other)=delete |
| constexpr | MetalView (MetalViewRef &&other)=delete |
| MetalView (WindowParam window) | |
| Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window. More... | |
Public Member Functions inherited from SDL::MetalView | |
| constexpr | MetalView (std::nullptr_t=nullptr) noexcept |
| Default ctor. | |
| constexpr | MetalView (const MetalViewRaw resource) noexcept |
| Constructs from MetalViewParam. More... | |
| constexpr | MetalView (MetalView &&other) noexcept |
| Move constructor. | |
| constexpr | MetalView (const MetalViewRef &other)=delete |
| constexpr | MetalView (MetalViewRef &&other)=delete |
| MetalView (WindowParam window) | |
| Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window. More... | |
| ~MetalView () | |
| Destructor. | |
| constexpr MetalView & | operator= (MetalView &&other) noexcept |
| Assignment operator. | |
| constexpr MetalViewRaw | get () const noexcept |
| Retrieves underlying MetalViewRaw. | |
| constexpr MetalViewRaw | release () noexcept |
| Retrieves underlying MetalViewRaw and clear this. | |
| constexpr auto | operator<=> (const MetalView &other) const noexcept=default |
| Comparison. | |
| constexpr | operator bool () const noexcept |
| Converts to bool. | |
| constexpr | operator MetalViewParam () const noexcept |
| Converts to MetalViewParam. | |
| void | Destroy () |
| Destroy an existing MetalView object. More... | |
| void * | GetLayer () |
| Get a pointer to the backing CAMetalLayer for the given view. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from SDL::MetalView | |
| constexpr | MetalView (const MetalView &other) noexcept=default |
| Copy constructor. | |
| constexpr MetalView & | operator= (const MetalView &other) noexcept=default |
| Assignment operator. | |
|
inlinenoexcept |
| resource | a MetalViewRaw or MetalView. |
This does not takes ownership!
|
inlinenoexcept |
| resource | a MetalViewRaw or MetalView. |
This does not takes ownership!
|
inlineexplicitconstexprnoexcept |
| resource | a MetalViewRaw to be wrapped. |
This assumes the ownership, call release() if you need to take back.
|
inline |
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 MetalView.GetLayer().
| window | the window. |