2020-03-16 20:46:54 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2020-03-16 21:21:04 +01:00
|
|
|
#include "initVulkan.h"
|
2020-03-16 20:46:54 +01:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
VkInstance vkInstance;
|
|
|
|
VkDevice device;
|
|
|
|
VkSurfaceKHR surface;
|
|
|
|
VkSwapchainKHR swapChain;
|
2020-03-18 12:29:08 +01:00
|
|
|
VkImageView *imageViews = NULL;
|
2020-03-16 20:46:54 +01:00
|
|
|
uint32_t amountImages;
|
|
|
|
|
|
|
|
// GLFW
|
|
|
|
ASSERT_GLFW_SUCCESS(glfwInit())
|
|
|
|
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
|
|
|
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
|
2020-03-16 21:21:04 +01:00
|
|
|
GLFWwindow *window = glfwCreateWindow(WIDTH, HEIGHT, "Informatikprojekt - Vulkan", NULL, NULL);
|
2020-03-16 20:46:54 +01:00
|
|
|
|
|
|
|
// Init Vulkan
|
2020-03-18 12:29:08 +01:00
|
|
|
ASSERT_SUCCESS(initVulkan(&vkInstance, &device, &surface, window, &swapChain, &imageViews, &amountImages))
|
2020-03-16 20:46:54 +01:00
|
|
|
|
|
|
|
// Render Loop
|
|
|
|
while (!glfwWindowShouldClose(window))
|
|
|
|
{
|
|
|
|
glfwPollEvents();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Stop Vulkan
|
|
|
|
shutdownVulkan(&vkInstance, &device, &surface, &swapChain, imageViews, amountImages);
|
|
|
|
|
|
|
|
// Stop GLFW
|
|
|
|
shutdownGLFW(window);
|
|
|
|
|
|
|
|
return SUCCESS;
|
|
|
|
}
|