18 #ifndef INCLUDED_RENDERER_BACKEND_VULKAN_SWAPCHAIN 19 #define INCLUDED_RENDERER_BACKEND_VULKAN_SWAPCHAIN 23 #include <glad/vulkan.h> 26 #include <unordered_map> 40 class CRingCommandContext;
57 void Present(VkSemaphore submitDone, VkQueue queue);
70 static std::unique_ptr<CSwapChain>
Create(
71 CDevice* device, VkSurfaceKHR surface,
int surfaceDrawableWidth,
int surfaceDrawableHeight,
72 std::unique_ptr<CSwapChain> oldSwapChain);
117 #endif // INCLUDED_RENDERER_BACKEND_VULKAN_SWAPCHAIN AttachmentLoadOp
Load operation is set for each attachment, what should be done with its content on BeginFramebufferPa...
Definition: IFramebuffer.h:36
VkFormat m_ImageFormat
Definition: SwapChain.h:86
AttachmentStoreOp
Store operation is set for each attachment, what should be done with its content on EndFramebufferPas...
Definition: IFramebuffer.h:51
bool AcquireNextImage(VkSemaphore acquireImageSemaphore)
Definition: SwapChain.cpp:245
VkSwapchainKHR m_SwapChain
Definition: SwapChain.h:79
CFramebuffer * GetCurrentBackbuffer(const AttachmentLoadOp colorAttachmentLoadOp, const AttachmentStoreOp colorAttachmentStoreOp, const AttachmentLoadOp depthStencilAttachmentLoadOp, const AttachmentStoreOp depthStencilAttachmentStoreOp)
Definition: SwapChain.cpp:330
VkSwapchainKHR GetVkSwapchain()
Definition: SwapChain.h:48
std::vector< std::unique_ptr< CTexture > > m_Textures
Definition: SwapChain.h:84
void SubmitCommandsBeforePresent(CRingCommandContext &commandContext)
Definition: SwapChain.cpp:290
Definition: SwapChain.h:43
bool IsValid() const
Definition: SwapChain.h:50
size_t operator()(const BackbufferKey &key) const
Definition: SwapChain.cpp:229
std::tuple< AttachmentLoadOp, AttachmentStoreOp, AttachmentLoadOp, AttachmentStoreOp > BackbufferKey
Definition: SwapChain.h:92
std::vector< VkImage > m_Images
Definition: SwapChain.h:83
~CSwapChain()
Definition: SwapChain.cpp:218
SwapChainBackbuffer & operator=(const SwapChainBackbuffer &)=delete
Definition: Framebuffer.h:39
uint32_t m_CurrentImageIndex
Definition: SwapChain.h:81
pthread_key_t key
Definition: wpthread.cpp:140
void Present(VkSemaphore submitDone, VkQueue queue)
Definition: SwapChain.cpp:302
Represents a texture object.
Definition: TextureManager.h:256
std::unique_ptr< CTexture > m_DepthTexture
Definition: SwapChain.h:85
CTexture * GetDepthTexture()
Definition: SwapChain.h:65
static std::unique_ptr< CSwapChain > Create(CDevice *device, VkSurfaceKHR surface, int surfaceDrawableWidth, int surfaceDrawableHeight, std::unique_ptr< CSwapChain > oldSwapChain)
Definition: SwapChain.cpp:45
CDevice * m_Device
Definition: SwapChain.h:76
Backend
Definition: Backend.h:27
Definition: SwapChain.h:93
A simple helper class to decouple command buffers rotation from frames presenting.
Definition: RingCommandContext.h:47
void SubmitCommandsAfterAcquireNextImage(CRingCommandContext &commandContext)
Definition: SwapChain.cpp:266
std::unordered_map< BackbufferKey, std::unique_ptr< CFramebuffer >, BackbufferKeyHash > backbuffers
Definition: SwapChain.h:98
std::vector< SwapChainBackbuffer > m_Backbuffers
Definition: SwapChain.h:108
unsigned int uint32_t
Definition: wposix_types.h:53
Definition: VideoMode.h:28
Definition: SwapChain.h:88
bool m_IsValid
Definition: SwapChain.h:78