1
0

37 lines
873 B
C
Raw Normal View History

#include <stdio.h>
2020-03-16 21:21:04 +01:00
#include "initVulkan.h"
int main()
{
VkInstance vkInstance;
VkDevice device;
VkSurfaceKHR surface;
VkSwapchainKHR swapChain;
2020-03-16 21:21:04 +01:00
VkImageView *imageViews;
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);
// Init Vulkan
ASSERT_SUCCESS(initVulkan(&vkInstance, &device, &surface, window, &swapChain, imageViews, &amountImages))
// Render Loop
while (!glfwWindowShouldClose(window))
{
glfwPollEvents();
}
// Stop Vulkan
shutdownVulkan(&vkInstance, &device, &surface, &swapChain, imageViews, amountImages);
// Stop GLFW
shutdownGLFW(window);
return SUCCESS;
}