Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::VKSwapChain Class Referencefinal

#include <vkSwapChain.h>

+ Inheritance diagram for Divide::VKSwapChain:

Public Member Functions

 VKSwapChain (VK_API &context, const VKDevice &device, const DisplayWindow &window)
 
 ~VKSwapChain ()
 
ErrorCode create (bool vSync, bool adaptiveSync, VkSurfaceKHR targetSurface)
 
void destroy ()
 
VkResult beginFrame ()
 
VkResult endFrame ()
 
vkb::Swapchain & getSwapChain () noexcept
 
VkImage getCurrentImage () const noexcept
 
VkImageView getCurrentImageView () const noexcept
 
FrameDatagetFrameData () noexcept
 
 PROPERTY_R_IW (VkExtent2D, surfaceExtent)
 

Private Attributes

VK_API_context
 
const VKDevice_device
 
const DisplayWindow_window
 
std::array< FrameData, Config::MAX_FRAMES_IN_FLIGHT_frames
 
vkb::Swapchain _swapChain {}
 
std::vector< VkImage > _swapchainImages
 
std::vector< VkImageView > _swapchainImageViews
 
U32 _swapchainImageIndex { 0u }
 

Additional Inherited Members

- Private Member Functions inherited from Divide::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (NonCopyable &&)=default
 
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 
- Private Member Functions inherited from Divide::NonMovable
 NonMovable (NonMovable &&)=delete
 
NonMovableoperator= (NonMovable &&)=delete
 
 NonMovable (const NonMovable &)=default
 
NonMovableoperator= (const NonMovable &)=default
 
 NonMovable ()=default
 
 ~NonMovable ()=default
 

Detailed Description

Definition at line 58 of file vkSwapChain.h.

Constructor & Destructor Documentation

◆ VKSwapChain()

Divide::VKSwapChain::VKSwapChain ( VK_API context,
const VKDevice device,
const DisplayWindow window 
)

Definition at line 13 of file vkSwapChain.cpp.

◆ ~VKSwapChain()

Divide::VKSwapChain::~VKSwapChain ( )

Definition at line 22 of file vkSwapChain.cpp.

Member Function Documentation

◆ beginFrame()

VkResult Divide::VKSwapChain::beginFrame ( )

Definition at line 116 of file vkSwapChain.cpp.

◆ create()

ErrorCode Divide::VKSwapChain::create ( bool  vSync,
bool  adaptiveSync,
VkSurfaceKHR  targetSurface 
)

Definition at line 50 of file vkSwapChain.cpp.

◆ destroy()

void Divide::VKSwapChain::destroy ( )

Definition at line 27 of file vkSwapChain.cpp.

◆ endFrame()

VkResult Divide::VKSwapChain::endFrame ( )

Definition at line 150 of file vkSwapChain.cpp.

◆ getCurrentImage()

VkImage Divide::VKSwapChain::getCurrentImage ( ) const
noexcept

Definition at line 195 of file vkSwapChain.cpp.

◆ getCurrentImageView()

VkImageView Divide::VKSwapChain::getCurrentImageView ( ) const
noexcept

Definition at line 200 of file vkSwapChain.cpp.

◆ getFrameData()

FrameData & Divide::VKSwapChain::getFrameData ( )
noexcept

Definition at line 205 of file vkSwapChain.cpp.

◆ getSwapChain()

vkb::Swapchain & Divide::VKSwapChain::getSwapChain ( )
noexcept

Definition at line 190 of file vkSwapChain.cpp.

◆ PROPERTY_R_IW()

Divide::VKSwapChain::PROPERTY_R_IW ( VkExtent2D  ,
surfaceExtent   
)

Member Data Documentation

◆ _context

VK_API& Divide::VKSwapChain::_context
private

Definition at line 78 of file vkSwapChain.h.

◆ _device

const VKDevice& Divide::VKSwapChain::_device
private

Definition at line 79 of file vkSwapChain.h.

◆ _frames

std::array<FrameData, Config::MAX_FRAMES_IN_FLIGHT> Divide::VKSwapChain::_frames
private

Definition at line 82 of file vkSwapChain.h.

◆ _swapChain

vkb::Swapchain Divide::VKSwapChain::_swapChain {}
private

Definition at line 83 of file vkSwapChain.h.

◆ _swapchainImageIndex

U32 Divide::VKSwapChain::_swapchainImageIndex { 0u }
private

Definition at line 89 of file vkSwapChain.h.

◆ _swapchainImages

std::vector<VkImage> Divide::VKSwapChain::_swapchainImages
private

Definition at line 86 of file vkSwapChain.h.

◆ _swapchainImageViews

std::vector<VkImageView> Divide::VKSwapChain::_swapchainImageViews
private

Definition at line 87 of file vkSwapChain.h.

◆ _window

const DisplayWindow& Divide::VKSwapChain::_window
private

Definition at line 80 of file vkSwapChain.h.


The documentation for this class was generated from the following files: