Swap chains, part 2 (#94)

This commit is contained in:
Kai Ninomiya
2017-07-27 18:30:57 -07:00
committed by GitHub
parent 3818e18c5c
commit c16a67ae52
49 changed files with 771 additions and 435 deletions

View File

@@ -19,6 +19,7 @@
// Error message (or nullptr if there was no error)
typedef const char* nxtSwapChainError;
constexpr nxtSwapChainError NXT_SWAP_CHAIN_NO_ERROR = nullptr;
typedef struct {
/// Backend-specific texture id/name/pointer
@@ -46,13 +47,17 @@ typedef struct {
void* userData = nullptr;
} nxtSwapChainImplementation;
#ifdef NXT_ENABLE_BACKEND_D3D12
#if defined(NXT_ENABLE_BACKEND_D3D12) && defined(__cplusplus)
typedef struct {
nxtDevice device = nullptr;
} nxtWSIContextD3D12;
#endif
#ifdef NXT_ENABLE_BACKEND_METAL
#if defined(NXT_ENABLE_BACKEND_METAL) && defined(__OBJC__)
#import <Metal/Metal.h>
typedef struct {
id<MTLDevice> device = nil;
} nxtWSIContextMetal;
#endif