mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Fixed swapchain with zero size (auto detect resolution)
This commit is contained in:
@@ -112,6 +112,14 @@ namespace GlitchyEngine.Renderer
|
|||||||
factory.Release();
|
factory.Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_width == 0 || _height == 0)
|
||||||
|
{
|
||||||
|
nativeSwapChain.GetDescription1(let desc);
|
||||||
|
|
||||||
|
_width = desc.Width;
|
||||||
|
_height = desc.Height;
|
||||||
|
}
|
||||||
|
|
||||||
RenderTarget2DDescription desc = .(backBufferFormat, _width, _height);
|
RenderTarget2DDescription desc = .(backBufferFormat, _width, _height);
|
||||||
desc.DepthStencilFormat = _depthStencilFormat;
|
desc.DepthStencilFormat = _depthStencilFormat;
|
||||||
desc.SwapChain = this;
|
desc.SwapChain = this;
|
||||||
|
|||||||
Reference in New Issue
Block a user