Added some extra swapchain params to app
This commit is contained in:
parent
08c8b689ad
commit
7c7c01bdac
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue