nxtSwapChainNextTexture: make texture a union of ptr, u32, u64

Making all textures represented by pointers is a problem for Vulkan
where VkImage is a 64bit type and wouldn't fit in a pointer on 32bit
builds. Make texture contain on of each useful type so that each backend
can choose which one it wants to receive.
This commit is contained in:
Corentin Wallez
2018-01-16 11:03:07 -05:00
committed by Corentin Wallez
parent c0f5ca1f5a
commit 0887236c81
7 changed files with 11 additions and 7 deletions

View File

@@ -23,7 +23,11 @@ constexpr nxtSwapChainError NXT_SWAP_CHAIN_NO_ERROR = nullptr;
typedef struct {
/// Backend-specific texture id/name/pointer
void* texture = nullptr;
union {
void* ptr;
uint64_t u64;
uint32_t u32;
} texture;
} nxtSwapChainNextTexture;
typedef struct {