get images from swapchain in vulkan
This commit is contained in:
@@ -74,6 +74,10 @@ gnReturnCode gnCreatePresentationQueueFn(gnPresentationQueue* presentationQueue,
|
|||||||
return GN_FAILED_TO_CREATE_PRESENTATION_QUEUE;
|
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;
|
return GN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,9 +4,6 @@
|
|||||||
|
|
||||||
typedef struct gnPlatformPresentationQueue_t {
|
typedef struct gnPlatformPresentationQueue_t {
|
||||||
VkSwapchainKHR swapChain;
|
VkSwapchainKHR swapChain;
|
||||||
// VkDevice* device;
|
|
||||||
// gnOutputDevice* outputDevice;
|
|
||||||
|
|
||||||
// vulkanSwapchainDetails swapchainDetails;
|
VkImage* swapChainImages;
|
||||||
// VkResult result;
|
|
||||||
} gnPlatformPresentationQueue;
|
} gnPlatformPresentationQueue;
|
||||||
|
@@ -20,7 +20,7 @@ typedef struct gnPresentationQueue_t {
|
|||||||
struct gnPlatformPresentationQueue_t* presentationQueue;
|
struct gnPlatformPresentationQueue_t* presentationQueue;
|
||||||
struct gnOutputDevice_t* outputDevice;
|
struct gnOutputDevice_t* outputDevice;
|
||||||
gnBool valid;
|
gnBool valid;
|
||||||
int imageCount;
|
uint32_t imageCount;
|
||||||
} gnPresentationQueue;
|
} gnPresentationQueue;
|
||||||
|
|
||||||
gnReturnCode gnCreatePresentationQueue(gnPresentationQueue* presentationQueue, struct gnOutputDevice_t* device, struct gnPresentationQueueInfo_t presentationInfo);
|
gnReturnCode gnCreatePresentationQueue(gnPresentationQueue* presentationQueue, struct gnOutputDevice_t* device, struct gnPresentationQueueInfo_t presentationInfo);
|
||||||
|
Reference in New Issue
Block a user