vOOlkan
An object oriented approach to Vulkan
Window.h
Go to the documentation of this file.
1#ifndef VULKAN_WINDOW
2#define VULKAN_WINDOW
3
4#define GLFW_INCLUDE_VULKAN
5#include <GLFW/glfw3.h>
6#include <memory>
7#include <string>
8
9
10namespace Vulkan { class Window; }
11
16 public:
17
26 Window(int width, int height, const std::string& title = "Vulkan window");
27
28 Window(Window&) = delete;
29 Window(Window&&) = delete;
30 Window& operator=(Window&) = delete;
31 Window& operator=(Window&&) = delete;
32
37 GLFWwindow* operator+() const;
38
39 private:
40
41 // Frees up the resources of the window.
42 static void deleteWindow(GLFWwindow* window);
43
44
45 std::unique_ptr<GLFWwindow, decltype(&deleteWindow)> window;
46 std::string title;
47};
48
49#endif
Manages the creation and lifetime of an OS window.
Definition: Window.h:15
GLFWwindow * operator+() const
Definition: Window.cpp:16
Window(Window &&)=delete
Window(int width, int height, const std::string &title="Vulkan window")
Creates a window.
Definition: Window.cpp:6
Window & operator=(Window &&)=delete
Window(Window &)=delete
Window & operator=(Window &)=delete
Types of queue families.
Definition: Animations.h:17