diff --git a/src/main.c b/src/main.c index 4430366..fc9c921 100644 --- a/src/main.c +++ b/src/main.c @@ -48,6 +48,9 @@ typedef struct Application { VkQueue graphicsQueue; VkQueue presentQueue; VkSwapchainKHR swapChain; + VkImage *swapChainImages; + VkFormat swapChainImageFormat; + VkExtent2D swapChainExtent; } Application; typedef struct SwapChainSupportDetails { @@ -562,6 +565,9 @@ void createSwapChain(Application *app) { fprintf(stderr, "Failed to create swapchain!"); exit(EXIT_FAILURE); } + + app->swapChainImageFormat = surfaceFormat.format; + app->swapChainExtent = extent; } void initVulkan(Application *app) { @@ -592,7 +598,7 @@ void cleanup(Application *app) { } int main(void) { - Application app; + Application app = {0}; initWindow(&app); initVulkan(&app);