Plasma Engine  2.0
Loading...
Searching...
No Matches
SwapChainVulkan.h
1
2#pragma once
3
4#include <RendererFoundation/Descriptors/Descriptors.h>
5#include <RendererFoundation/Device/SwapChain.h>
6#include <RendererVulkan/RendererVulkanDLL.h>
7
8#include <vulkan/vulkan.hpp>
9
11
13{
14public:
15 virtual void AcquireNextRenderTarget(plGALDevice* pDevice) override;
16 virtual void PresentRenderTarget(plGALDevice* pDevice) override;
17 virtual plResult UpdateSwapChain(plGALDevice* pDevice, plEnum<plGALPresentMode> newPresentMode) override;
18
19 PL_ALWAYS_INLINE vk::SwapchainKHR GetVulkanSwapChain() const;
20
21protected:
22 friend class plGALDeviceVulkan;
23 friend class plMemoryUtils;
24
26
27 virtual ~plGALSwapChainVulkan();
28
29 virtual plResult InitPlatform(plGALDevice* pDevice) override;
30 plResult CreateSwapChainInternal();
31 void DestroySwapChainInternal(plGALDeviceVulkan* pVulkanDevice);
32 virtual plResult DeInitPlatform(plGALDevice* pDevice) override;
33
34protected:
35 plGALDeviceVulkan* m_pVulkanDevice = nullptr;
36 plEnum<plGALPresentMode> m_currentPresentMode;
37
38 vk::SurfaceKHR m_vulkanSurface;
39 vk::SwapchainKHR m_vulkanSwapChain;
40 plHybridArray<vk::Image, 3> m_swapChainImages;
41 plHybridArray<plGALTextureHandle, 3> m_swapChainTextures;
42 plUInt32 m_uiCurrentSwapChainImage = 0;
43
44 vk::Semaphore m_currentPipelineImageAvailableSemaphore;
45};
46
47#include <RendererVulkan/Device/Implementation/SwapChainVulkan_inl.h>
The plRenderDevice class is the primary interface for interactions with rendering APIs It contains a ...
Definition Device.h:19
The Vulkan device implementation of the graphics abstraction layer.
Definition DeviceVulkan.h:58
Definition SwapChainVulkan.h:13
Definition SwapChain.h:38
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
This class provides functions to work on raw memory.
Definition MemoryUtils.h:26
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition Descriptors.h:20
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54