metal: initial work on setRenderTarget

This commit is contained in:
Alex Szpakowski
2020-02-16 09:04:50 -04:00
parent 455b0c2c6b
commit e001e4336d
6 changed files with 68 additions and 16 deletions
+8 -1
View File
@@ -578,7 +578,14 @@ bool Window::setWindow(int width, int height, WindowSettings *settings)
{
double scaledw, scaledh;
fromPixels((double) pixelWidth, (double) pixelHeight, scaledw, scaledh);
graphics->setMode((int) scaledw, (int) scaledh, pixelWidth, pixelHeight, f.stencil);
void *context = (void *) glcontext;
#if defined(LOVE_MACOS) || defined(LOVE_IOS)
if (renderer == graphics::Graphics::RENDERER_METAL)
context = (void *) metalView;
#endif
graphics->setMode(context, (int) scaledw, (int) scaledh, pixelWidth, pixelHeight, f.stencil);
}
#ifdef LOVE_ANDROID