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

@@ -35,7 +35,7 @@ typedef struct {
void (*Destroy)(void* userData);
/// Configure/reconfigure the swap chain.
nxtSwapChainError (*Configure)(void* userData, nxtTextureFormat format, uint32_t width, uint32_t height);
nxtSwapChainError (*Configure)(void* userData, nxtTextureFormat format, nxtTextureUsageBit allowedUsage, nxtTextureUsageBit initialUsage, uint32_t width, uint32_t height);
/// Acquire the next texture from the swap chain.
nxtSwapChainError (*GetNextTexture)(void* userData, nxtSwapChainNextTexture* nextTexture);