summaryrefslogtreecommitdiff
path: root/src/window.hpp
blob: 6dc690b21a0e937bc3f4798a4bf0ea43a3ae24db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef PKE_WINDOW_HPP
#define PKE_WINDOW_HPP

#include "asset-manager.hpp"
#include "backends/imgui_impl_glfw.h"
#include "backends/imgui_impl_vulkan.h"
#include "event.hpp"
#include "imgui.h"
#include "memory.hpp"

#include <cstring>
#include <cstdio>
#include <vector>
#include <cassert>
#include <GLFW/glfw3.h>
#include <vulkan/vulkan.h>

const unsigned int MAX_FRAMES_IN_FLIGHT = 2;

extern GLFWwindow *window;
extern VkInstance vkInstance;
extern VkPhysicalDevice vkPhysicalDevice;
extern VkPhysicalDeviceProperties vkPhysicalDeviceProperties;
extern VkSurfaceKHR vkSurfaceKHR;
extern VkDevice vkDevice;

struct PKEWindowProperties {
	unsigned int width = 1280;
	unsigned int height = 720;
};

void CreateWindow(PKEWindowProperties *wp);
void DestroyWindow();
VkShaderModule UploadShader(AssetHandle handle);
void Render();

#endif /* PKE_WINDOW_HPP */