From 4d79896b7656dc7e3c3dee690e68fb79113e821c Mon Sep 17 00:00:00 2001 From: kearwood Date: Wed, 11 Aug 2021 18:02:04 -0700 Subject: [PATCH] Introduced KrSurfaceMapIndex type, to decouple API from internal surface indices. --- kraken/KRContext.h | 2 ++ kraken/public/kraken.h | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kraken/KRContext.h b/kraken/KRContext.h index 55cbc80..7511eb1 100755 --- a/kraken/KRContext.h +++ b/kraken/KRContext.h @@ -129,6 +129,7 @@ public: static void activateStreamerContext(); static void activateRenderContext(); + typedef int KrDeviceHandle; typedef struct { VkPhysicalDevice device; VkDevice logicalDevice; @@ -140,6 +141,7 @@ public: VkQueue computeQueue; } DeviceInfo; + typedef int KrSurfaceHandle; typedef struct { KrSurfaceHandle surfaceHandle; KrDeviceHandle deviceHandle; diff --git a/kraken/public/kraken.h b/kraken/public/kraken.h index d0961cf..ac50ce2 100644 --- a/kraken/public/kraken.h +++ b/kraken/public/kraken.h @@ -109,8 +109,7 @@ typedef enum { typedef int KrResourceMapIndex; typedef int KrSceneNodeMapIndex; -typedef int KrSurfaceHandle; -typedef int KrDeviceHandle; +typedef int KrSurfaceMapIndex; typedef struct { KrStructureType sType; @@ -119,7 +118,7 @@ typedef struct { typedef struct { KrStructureType sType; - KrSurfaceHandle surfaceHandle; + KrSurfaceMapIndex surfaceHandle; #if defined(_WIN32) || defined(_WIN64) void* hWnd; // Can static cast to HWND #endif @@ -127,7 +126,7 @@ typedef struct { typedef struct { KrStructureType sType; - KrSurfaceHandle surfaceHandle; + KrSurfaceMapIndex surfaceHandle; } KrDeleteWindowSurfaceInfo; typedef struct {