Cleanup window resources and Vulkan instance
This commit is contained in:
parent
25be7b09e8
commit
98665fbc66
1 changed files with 8 additions and 4 deletions
12
main.cpp
12
main.cpp
|
@ -2,10 +2,10 @@
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
|
|
||||||
int main(int argc, char* argv[]) {
|
int main(int, char*[]) {
|
||||||
SDL_Init(SDL_INIT_VIDEO);
|
SDL_Window* window = SDL_CreateWindow("Graph", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_VULKAN);
|
||||||
|
if(!window)
|
||||||
SDL_Window* window = SDL_CreateWindow("Graph", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0);
|
return -1;
|
||||||
|
|
||||||
VkInstanceCreateInfo info = {};
|
VkInstanceCreateInfo info = {};
|
||||||
|
|
||||||
|
@ -23,5 +23,9 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vkDestroyInstance(instance, nullptr);
|
||||||
|
|
||||||
|
SDL_DestroyWindow(window);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue