mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 18:42:40 +00:00
Metal backend, part 5
This commit is contained in:
parent
cb0856f635
commit
25f65635a2
1 changed files with 3 additions and 3 deletions
|
@ -153,7 +153,7 @@ bool FurnaceGUIRenderMetal::init(SDL_Window* win, int swapInterval) {
|
|||
|
||||
sdlRend=SDL_CreateRenderer(win,-1,SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC|SDL_RENDERER_TARGETTEXTURE);
|
||||
|
||||
if (sdlRend==NULL) return NULL;
|
||||
if (sdlRend==NULL) return false;
|
||||
|
||||
priv->context=(__bridge CAMetalLayer*)SDL_RenderGetMetalLayer(sdlRend);
|
||||
priv->context.pixelFormat=MTLPixelFormatBGRA8Unorm;
|
||||
|
@ -161,7 +161,7 @@ bool FurnaceGUIRenderMetal::init(SDL_Window* win, int swapInterval) {
|
|||
}
|
||||
|
||||
void FurnaceGUIRenderMetal::initGUI(SDL_Window* win) {
|
||||
ImGui_ImplMetal_Init(context.device);
|
||||
ImGui_ImplMetal_Init(priv->context.device);
|
||||
ImGui_ImplSDL2_InitForMetal(win);
|
||||
|
||||
priv->cmdQueue=[priv->context.device newCommandQueue];
|
||||
|
@ -169,7 +169,7 @@ void FurnaceGUIRenderMetal::initGUI(SDL_Window* win) {
|
|||
}
|
||||
|
||||
void FurnaceGUIRenderMetal::quitGUI() {
|
||||
ImGui_ImplSDLRenderer2_Shutdown();
|
||||
ImGui_ImplMetal_Shutdown();
|
||||
[priv->renderPass release];
|
||||
[priv->cmdQueue release];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue