Clean up some common Image and Canvas code.

This commit is contained in:
Alex Szpakowski
2020-02-01 23:54:51 -04:00
parent 7684920f19
commit 6c447ab4f6
11 changed files with 140 additions and 201 deletions
+1 -1
View File
@@ -694,7 +694,7 @@ void Graphics::setCanvas(const RenderTargets &rts)
PixelFormat dsformat = PIXELFORMAT_STENCIL8;
if (wantsdepth && wantsstencil)
dsformat = PIXELFORMAT_DEPTH24_UNORM_STENCIL8;
else if (wantsdepth && isCanvasFormatSupported(PIXELFORMAT_DEPTH24_UNORM, false))
else if (wantsdepth && isPixelFormatSupported(PIXELFORMAT_DEPTH24_UNORM, true, false, false))
dsformat = PIXELFORMAT_DEPTH24_UNORM;
else if (wantsdepth)
dsformat = PIXELFORMAT_DEPTH16_UNORM;