Update SwapChain to configure texture usage

Explicitly configure swap chain usage in bindings and examples

Fix missing case in switch

Make swap chain Present usage implicit

Author: Austin Eng <enga@google.com>
This commit is contained in:
Kai Ninomiya
2017-08-29 13:35:05 -07:00
committed by Kai Ninomiya
parent 08a0081c13
commit ee7b6b1b62
22 changed files with 96 additions and 26 deletions

View File

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