Make binding expose the preferred format

This commit is contained in:
Corentin Wallez
2017-09-21 12:54:53 -04:00
committed by Corentin Wallez
parent 405dcd636a
commit 2e31e8f0bf
21 changed files with 51 additions and 14 deletions

View File

@@ -465,7 +465,8 @@ namespace {
queue = device.CreateQueueBuilder().GetResult();
swapchain = GetSwapChain(device);
swapchain.Configure(nxt::TextureFormat::R8G8B8A8Unorm, nxt::TextureUsageBit::OutputAttachment, 640, 480);
swapchain.Configure(GetPreferredSwapChainTextureFormat(),
nxt::TextureUsageBit::OutputAttachment, 640, 480);
renderpass = CreateDefaultRenderPass(device);
depthStencilView = CreateDefaultDepthStencilView(device);