Introduced KrSurfaceMapIndex type, to decouple API from internal surface indices.

This commit is contained in:
2021-08-11 18:02:04 -07:00
parent 95a506e6bf
commit 4d79896b76
2 changed files with 5 additions and 4 deletions

View File

@@ -129,6 +129,7 @@ public:
static void activateStreamerContext(); static void activateStreamerContext();
static void activateRenderContext(); static void activateRenderContext();
typedef int KrDeviceHandle;
typedef struct { typedef struct {
VkPhysicalDevice device; VkPhysicalDevice device;
VkDevice logicalDevice; VkDevice logicalDevice;
@@ -140,6 +141,7 @@ public:
VkQueue computeQueue; VkQueue computeQueue;
} DeviceInfo; } DeviceInfo;
typedef int KrSurfaceHandle;
typedef struct { typedef struct {
KrSurfaceHandle surfaceHandle; KrSurfaceHandle surfaceHandle;
KrDeviceHandle deviceHandle; KrDeviceHandle deviceHandle;

View File

@@ -109,8 +109,7 @@ typedef enum {
typedef int KrResourceMapIndex; typedef int KrResourceMapIndex;
typedef int KrSceneNodeMapIndex; typedef int KrSceneNodeMapIndex;
typedef int KrSurfaceHandle; typedef int KrSurfaceMapIndex;
typedef int KrDeviceHandle;
typedef struct { typedef struct {
KrStructureType sType; KrStructureType sType;
@@ -119,7 +118,7 @@ typedef struct {
typedef struct { typedef struct {
KrStructureType sType; KrStructureType sType;
KrSurfaceHandle surfaceHandle; KrSurfaceMapIndex surfaceHandle;
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
void* hWnd; // Can static cast to HWND void* hWnd; // Can static cast to HWND
#endif #endif
@@ -127,7 +126,7 @@ typedef struct {
typedef struct { typedef struct {
KrStructureType sType; KrStructureType sType;
KrSurfaceHandle surfaceHandle; KrSurfaceMapIndex surfaceHandle;
} KrDeleteWindowSurfaceInfo; } KrDeleteWindowSurfaceInfo;
typedef struct { typedef struct {