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
+3 -3
View File
@@ -127,7 +127,8 @@ Graphics::Graphics()
double dpiH = h;
window->windowToDPICoords(&dpiW, &dpiH);
setMode((int) dpiW, (int) dpiH, window->getPixelWidth(), window->getPixelHeight(), settings.stencil);
void *context = nullptr; // TODO
setMode(context, (int) dpiW, (int) dpiH, window->getPixelWidth(), window->getPixelHeight(), settings.stencil);
}
}
}
@@ -188,7 +189,7 @@ void Graphics::setViewportSize(int width, int height, int pixelwidth, int pixelh
}
}
bool Graphics::setMode(int width, int height, int pixelwidth, int pixelheight, bool windowhasstencil)
bool Graphics::setMode(void *context, int width, int height, int pixelwidth, int pixelheight, bool windowhasstencil)
{
this->width = width;
this->height = height;
@@ -521,7 +522,6 @@ void Graphics::setRenderTargetsInternal(const RenderTargets &rts, int w, int h,
OpenGL::TempDebugGroup debuggroup("setRenderTargets");
flushStreamDraws();
endPass();
bool iswindow = rts.getFirstTarget().texture == nullptr;