13 #include <GLFW/glfw3.h> 22 VkInstance instance = VulkanContext::getCurrent()->getInstance()->getHandle();
25 if (glfwCreateWindowSurface(instance, window->
getHandle(),
nullptr, &handle) != VK_SUCCESS) {
26 throw runtime_error(
"Could not create a window surface!");
30 Surface::~Surface(
void) {
31 VkInstance instance = VulkanContext::getCurrent()->getInstance()->getHandle();
34 vkDestroySurfaceKHR(instance, handle,
nullptr);
37 VkSurfaceKHR Surface::getHandle() {
This class provides a GLFW window with a Vulkan instance.
Generic namespace for the SimpleGL framework.
GLFWwindow * getHandle()
Returns the handle of the window.