-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathWindow.h
More file actions
38 lines (22 loc) · 961 Bytes
/
Window.h
File metadata and controls
38 lines (22 loc) · 961 Bytes
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
38
#ifndef WINDOW_H
#define WINDOW_H
#include <memory>
#include <string>
#include <vector>
#include <vulkan/vulkan_core.h>
#include "VulkanContext.h"
class Window {
public:
virtual VkSurfaceKHR createSurface(std::shared_ptr<VulkanContext> context) = 0;
virtual std::array<bool, 3> getMouseButton() { return {false, false, false}; }
virtual std::vector<std::string> getRequiredInstanceExtensions() = 0;
[[nodiscard]] virtual std::pair<uint32_t, uint32_t> getFramebufferSize() const = 0;
virtual std::array<double, 2> getCursorTranslation() { return {0, 0}; }
virtual std::array<bool, 9> getKeys() { return {false, false, false, false, false, false, false, false, false}; }
virtual void mouseCapture(bool capture) { }
virtual bool tick() { return false; };
virtual void logTranslation(float x, float y) { };
virtual void logMovement(float x, float y) { };
virtual ~Window() = default;
};
#endif //WINDOW_H