World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SDL_metal.h

См. исходные тексты.

Определения типов

typedef voidSDL_MetalView
 A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS). Подробнее...
 

Функции

Metal support functions
DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView (SDL_Window *window)
 Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window. Подробнее...
 
DECLSPEC void SDLCALL SDL_Metal_DestroyView (SDL_MetalView view)
 Destroy an existing SDL_MetalView object. Подробнее...
 

Подробное описание

Header file for functions to creating Metal layers and views on SDL windows.

См. определение в файле SDL_metal.h

Типы

◆ SDL_MetalView

typedef void* SDL_MetalView

A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).

Заметки
This can be cast directly to an NSView or UIView.

См. определение в файле SDL_metal.h строка 44

Функции

◆ SDL_Metal_CreateView()

DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView ( SDL_Window window)

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, and the CAMetalLayer can be accessed from the view's 'layer' property.

UIView *uiview = (__bridge UIView *)metalview;
CAMetalLayer *metallayer = (CAMetalLayer *)uiview.layer;
// [...]
См. также
SDL_Metal_DestroyView

◆ SDL_Metal_DestroyView()

DECLSPEC void SDLCALL SDL_Metal_DestroyView ( SDL_MetalView  view)

Destroy an existing SDL_MetalView object.

This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was called after SDL_CreateWindow.

См. также
SDL_Metal_CreateView
SDL_Metal_CreateView
DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window *window)
Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window.
SDL_Metal_DestroyView
DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view)
Destroy an existing SDL_MetalView object.
SDL_MetalView
void * SDL_MetalView
A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
Definition: SDL_metal.h:44
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580