SimpleGL
1.1.0
A framework for platform independent rendering
Main Page
Namespaces
Classes
Files
File List
File Members
Backends
Vulkan
include
SimpleGL_vk
vulkan_context.hpp
Go to the documentation of this file.
1
8
#ifndef VULKAN_CONTEXT_HPP
9
#define VULKAN_CONTEXT_HPP
10
11
#include <SimpleGL_vk/SimpleGL_vk_Export.h>
12
13
#include <vector>
14
15
#include <glm/glm.hpp>
16
17
#include "
vulkan_instance.hpp
"
18
#include "
debug_report.hpp
"
19
#include "
surface.hpp
"
20
#include "
physical_device.hpp
"
21
#include "
logical_device.hpp
"
22
#include "
swapchain.hpp
"
23
#include "
render_pass.hpp
"
24
#include "
framebuffer.hpp
"
25
#include "
command_buffer.hpp
"
26
#include "
descriptor_set.hpp
"
27
#include "
synchronization.hpp
"
28
29
namespace
sgl
{
30
36
class
SIMPLEGL_VK_EXPORT
VulkanContext
{
37
38
private
:
40
static
VulkanContext
* current;
41
43
Instance
* instance;
44
46
DebugReportCallback
* debugReportCallback;
47
49
std::vector<PhysicalDevice*> availablePhysicalDevices;
50
52
PhysicalDevice
* physicalDevice;
53
55
Device
* device;
56
58
Swapchain
* swapchain;
59
61
std::vector<FramebufferVK*> swapchainFramebuffers;
62
64
CommandPool
* commandPool;
65
67
DescriptorPool
* descriptorPool;
68
70
Fence
* renderFence;
71
72
public
:
78
static
VulkanContext
* getCurrent();
79
85
static
void
setCurrent(
VulkanContext
* context);
86
88
VulkanContext
(
void
);
89
91
~
VulkanContext
(
void
);
92
98
Instance
* getInstance();
99
105
DebugReportCallback
* getDebugReportCallback();
106
112
std::vector<PhysicalDevice*> getAvailablePhysicalDevices();
113
119
PhysicalDevice
* getPhysicalDevice();
120
126
Device
* getDevice();
127
133
Swapchain
* getSwapchain();
134
140
uint32_t getSwapchainCount();
141
147
uint32_t getSwapchainIndex();
148
154
FramebufferVK
* getSwapchainFramebuffer();
155
161
CommandPool
* getCommandPool();
162
168
DescriptorPool
* getDescriptorPool();
169
175
Fence
* getRenderFence();
176
178
void
setupDebugCallback();
179
185
void
pickPhysicalDevice(
Surface
* surface);
186
188
void
createLogicalDevice();
189
196
void
createSwapchain(
Surface
* surface, glm::ivec2 size);
197
203
void
createFramebuffers(
RenderPass
* renderPass);
204
206
void
createCommandPool();
207
209
void
createDescriptorPool();
210
212
void
createRenderFence();
213
};
214
}
215
216
#endif
/* VULKAN_CONTEXT_HPP */
sgl::Instance
This class wraps a Vulkan instance.
Definition:
vulkan_instance.hpp:25
sgl::DescriptorPool
This class wraps a Vulkan descriptor pool.
Definition:
descriptor_set.hpp:30
command_buffer.hpp
descriptor_set.hpp
sgl::PhysicalDevice
This class wraps a Vulkan physical device and represents a graphics card.
Definition:
physical_device.hpp:64
sgl::VulkanContext
This class contains all relevant Vulkan objects to setup a Vulkan application.
Definition:
vulkan_context.hpp:36
surface.hpp
sgl
Generic namespace for the SimpleGL framework.
Definition:
application.hpp:18
logical_device.hpp
sgl::CommandPool
This class wraps a Vulkan command pool.
Definition:
command_buffer.hpp:27
sgl::FramebufferVK
This class wraps a Vulkan framebuffer.
Definition:
framebuffer.hpp:44
synchronization.hpp
render_pass.hpp
debug_report.hpp
framebuffer.hpp
sgl::Swapchain
This class wraps a Vulkan swapchain.
Definition:
swapchain.hpp:51
swapchain.hpp
sgl::DebugReportCallback
This class wraps a Vulkan debug report callback.
Definition:
debug_report.hpp:24
sgl::RenderPass
This class wraps a Vulkan render pass.
Definition:
render_pass.hpp:22
sgl::Fence
This class wraps a Vulkan fence.
Definition:
synchronization.hpp:48
physical_device.hpp
sgl::Surface
This class wraps a Vulkan surface.
Definition:
surface.hpp:25
sgl::Device
This class wraps a Vulkan logical device.
Definition:
logical_device.hpp:36
vulkan_instance.hpp
Generated on Sat Jun 30 2018 21:55:23 for SimpleGL by
1.8.11