-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9849f5f
commit 5933fb9
Showing
15 changed files
with
253 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#include <GLFW/glfw3.h> | ||
#include <volk.h> | ||
|
||
namespace inexor::vulkan_renderer::wrapper { | ||
|
||
/// RAII wrapper class for VkSurfaceKHR | ||
class Surface { | ||
|
||
private: | ||
const VkInstance m_instance{VK_NULL_HANDLE}; | ||
GLFWwindow *m_window{nullptr}; | ||
VkSurfaceKHR m_surface{VK_NULL_HANDLE}; | ||
|
||
public: | ||
/// Create a GLFW surface | ||
/// @param instance The Vulkan instance | ||
/// @param window The GLFW window to create the surface with | ||
Surface(VkInstance instance, GLFWwindow *window); | ||
Surface(const Surface &) = delete; | ||
// TODO: Implement me! | ||
Surface(Surface &&) noexcept; | ||
~Surface(); | ||
|
||
Surface &operator=(const Surface &) = delete; | ||
// TODO: Implement me! | ||
Surface &operator=(Surface &&) noexcept; | ||
|
||
[[nodiscard]] VkSurfaceKHR surface() const { | ||
return m_surface; | ||
} | ||
}; | ||
|
||
} // namespace inexor::vulkan_renderer::wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.