Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
GraphicsSwapchainVK.hpp
Go to the documentation of this file.
1#pragma once
3#include "Vulkan.hpp"
4
5namespace Faro
6{
8 {
9 public:
10 void Init(GraphicsAdapter* adapter, Window* window) override;
11 void Destroy() override;
12
13 void Present() override;
14
15 VkImage GetBackbufferImage(uint32 index);
16
17 private:
18 bool CreateSurface(Window* window);
19 bool CreateSwapchain();
20 bool GetImages();
21
22 VkSurfaceFormatKHR SelectFormat();
23 VkPresentModeKHR SelectPresentMode();
24
25 void GetNextImageIndex();
26
27 VkSurfaceKHR windowSurface = nullptr;
28 VkSwapchainKHR swapchain = nullptr;
29 Array<VkImage> images;
30
31 uint32 currentImage = 0;
32 };
33}
Definition Array.hpp:11
Definition GraphicsAdapter.hpp:27
Definition GraphicsSwapchainVK.hpp:8
void Destroy() override
Run the destruction logic of this class. This also frees its memory.
Definition GraphicsSwapchainVK.cpp:21
VkImage GetBackbufferImage(uint32 index)
Definition GraphicsSwapchainVK.cpp:55
void Present() override
Definition GraphicsSwapchainVK.cpp:40
Definition GraphicsSwapchain.hpp:16
void Init() override
Run the initialization logic of this object. Should be overriden by deriving classes.
Definition GraphicsAdapterChild.cpp:16
Definition Window.hpp:29
Definition Array.hpp:8
uint32_t uint32
Definition Primitives.hpp:12