jGL
Loading...
Searching...
No Matches
include
jGL
Vulkan
surface.h
Go to the documentation of this file.
1
#ifndef SURFACE
2
#define SURFACE
3
4
#define GLFW_INCLUDE_VULKAN
5
#include <GLFW/glfw3.h>
6
7
#include <exception>
8
9
namespace
jGL::Vulkan
10
{
11
class
Surface
12
{
13
14
public
:
15
16
Surface
() =
default
;
17
18
Surface
(
const
VkInstance & instance, GLFWwindow * window)
19
{
20
if
(glfwCreateWindowSurface(instance, window,
nullptr
, &surface) != VK_SUCCESS)
21
{
22
throw
std::runtime_error(
"Failed to create window surface"
);
23
}
24
}
25
26
const
VkSurfaceKHR &
getVkSurfaceKHR
(){
return
surface; }
27
28
private
:
29
30
VkSurfaceKHR surface;
31
};
32
}
33
34
#endif
/* SURFACE */
jGL::Vulkan::Surface
Definition
surface.h:12
jGL::Vulkan::Surface::Surface
Surface(const VkInstance &instance, GLFWwindow *window)
Definition
surface.h:18
jGL::Vulkan::Surface::Surface
Surface()=default
jGL::Vulkan::Surface::getVkSurfaceKHR
const VkSurfaceKHR & getVkSurfaceKHR()
Definition
surface.h:26
jGL::Vulkan
Definition
buffer.h:10
Generated by
1.9.8