diff --git a/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.c b/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.c index 3c40e67..0a33c00 100644 --- a/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.c +++ b/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.c @@ -74,6 +74,10 @@ gnReturnCode gnCreatePresentationQueueFn(gnPresentationQueue* presentationQueue, return GN_FAILED_TO_CREATE_PRESENTATION_QUEUE; } + vkGetSwapchainImagesKHR(device->outputDevice->device, presentationQueue->presentationQueue->swapChain, &presentationQueue->imageCount, NULL); + presentationQueue->presentationQueue->swapChainImages = malloc(sizeof(VkImage) * presentationQueue->imageCount); + vkGetSwapchainImagesKHR(device->outputDevice->device, presentationQueue->presentationQueue->swapChain, &presentationQueue->imageCount, presentationQueue->presentationQueue->swapChainImages); + return GN_SUCCESS; } diff --git a/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.h b/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.h index 3886ea2..161b9be 100644 --- a/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.h +++ b/rendering_api/vulkan/src/presentation_queue/vulkan_presentation_queue.h @@ -4,9 +4,6 @@ typedef struct gnPlatformPresentationQueue_t { VkSwapchainKHR swapChain; - // VkDevice* device; - // gnOutputDevice* outputDevice; - // vulkanSwapchainDetails swapchainDetails; - // VkResult result; + VkImage* swapChainImages; } gnPlatformPresentationQueue; diff --git a/src/core/presentation_queue/gryphn_presentation_queue.h b/src/core/presentation_queue/gryphn_presentation_queue.h index eefb066..39985fe 100644 --- a/src/core/presentation_queue/gryphn_presentation_queue.h +++ b/src/core/presentation_queue/gryphn_presentation_queue.h @@ -20,7 +20,7 @@ typedef struct gnPresentationQueue_t { struct gnPlatformPresentationQueue_t* presentationQueue; struct gnOutputDevice_t* outputDevice; gnBool valid; - int imageCount; + uint32_t imageCount; } gnPresentationQueue; gnReturnCode gnCreatePresentationQueue(gnPresentationQueue* presentationQueue, struct gnOutputDevice_t* device, struct gnPresentationQueueInfo_t presentationInfo);