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

@@ -37,6 +37,8 @@ namespace opengl {
switch (format) {
case nxt::TextureFormat::R8G8B8A8Unorm:
return {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE};
case nxt::TextureFormat::R8G8B8A8Uint:
return { GL_RGBA8UI, GL_RGBA, GL_UNSIGNED_INT };
case nxt::TextureFormat::D32FloatS8Uint:
return {GL_DEPTH32F_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV};
default: