Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/main.cpp

32 lines
727 B
C++
Raw Normal View History

2018-09-26 17:51:22 -04:00
#include <iostream>
#include <SDL.h>
2018-09-27 00:22:33 -04:00
#include <vulkan/vulkan.h>
2018-09-26 17:51:22 -04:00
int main(int, char*[]) {
SDL_Window* window = SDL_CreateWindow("Graph", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_VULKAN);
if(!window)
return -1;
2018-09-26 17:51:22 -04:00
2018-09-27 00:22:33 -04:00
VkInstanceCreateInfo info = {};
VkInstance instance;
vkCreateInstance(&info, nullptr, &instance);
if(!instance)
return -1;
2018-09-26 17:51:22 -04:00
bool running = true;
while(running) {
SDL_Event event = {};
while(SDL_PollEvent(&event)) {
if(event.type == SDL_QUIT)
running = false;
}
}
vkDestroyInstance(instance, nullptr);
SDL_DestroyWindow(window);
2018-09-26 17:51:22 -04:00
return 0;
}