Kale
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | List of all members
Kale::Vulkan::SwapChain Class Reference

#include <SwapChain.hpp>

+ Inheritance diagram for Kale::Vulkan::SwapChain:

Public Member Functions

 SwapChain (Device &device)
 
 SwapChain ()
 
void init (Device &device) override
 
void createFrameBuffers (Renderer &renderer)
 
void freeResources (bool remove=true) override
 
- Public Member Functions inherited from Kale::Vulkan::ParentResource< SwapChain >
virtual ~ParentResource ()
 
void freeChildren ()
 

Public Attributes

vk::UniqueSwapchainKHR swapchain
 
vk::Extent2D extent
 
vk::Format format
 
SwapChainSupportDetails support
 
std::vector< vk::UniqueImageView > imageViews
 
std::vector< vk::Image > images
 
std::vector< vk::UniqueFramebuffer > frameBuffers
 

Private Member Functions

void createSwapChain ()
 
void createImageViews ()
 

Additional Inherited Members

- Protected Member Functions inherited from Kale::Vulkan::ChildResource< Device >
 ChildResource ()
 
 ChildResource (Device &parent)
 
 ~ChildResource ()
 
- Protected Attributes inherited from Kale::Vulkan::ParentResource< SwapChain >
std::list< ChildResource< SwapChain > * > resources
 
- Protected Attributes inherited from Kale::Vulkan::ChildResource< Device >
DeviceparentPtr
 

Detailed Description

Simple Kale Abstraction over vulkan swap chains

Definition at line 39 of file SwapChain.hpp.

Constructor & Destructor Documentation

◆ SwapChain() [1/2]

SwapChain::SwapChain ( Device & device)

Creates a new swap chain given the device to create it from

Parameters
deviceThe device to create the swap chain from

Definition at line 33 of file SwapChain.cpp.

◆ SwapChain() [2/2]

SwapChain::SwapChain ( )

Creates an uninstantiated SwapChain

Definition at line 133 of file SwapChain.cpp.

Member Function Documentation

◆ createFrameBuffers()

void SwapChain::createFrameBuffers ( Renderer & renderer)

Creates the frame buffers from the swap chain images/image views given the renderer

Parameters
rendererThe renderer to create from

Definition at line 115 of file SwapChain.cpp.

◆ createImageViews()

void SwapChain::createImageViews ( )
private

Creates image views from the images and swapchain

Definition at line 101 of file SwapChain.cpp.

◆ createSwapChain()

void SwapChain::createSwapChain ( )
private

Creates the swapchain

Definition at line 50 of file SwapChain.cpp.

◆ freeResources()

void SwapChain::freeResources ( bool remove = true)
overridevirtual

Frees resources if not already freed

Reimplemented from Kale::Vulkan::ChildResource< Device >.

Definition at line 140 of file SwapChain.cpp.

◆ init()

void SwapChain::init ( Device & device)
overridevirtual

Initializes the object

Parameters
device

Reimplemented from Kale::Vulkan::ChildResource< Device >.

Definition at line 41 of file SwapChain.cpp.

Member Data Documentation

◆ extent

vk::Extent2D Kale::Vulkan::SwapChain::extent

The extent of the swapchain

Definition at line 62 of file SwapChain.hpp.

◆ format

vk::Format Kale::Vulkan::SwapChain::format

The format of the swapchain

Definition at line 67 of file SwapChain.hpp.

◆ frameBuffers

std::vector<vk::UniqueFramebuffer> Kale::Vulkan::SwapChain::frameBuffers

The frame buffers used for rendering

Definition at line 87 of file SwapChain.hpp.

◆ images

std::vector<vk::Image> Kale::Vulkan::SwapChain::images

The images stored within the swapchain

Definition at line 82 of file SwapChain.hpp.

◆ imageViews

std::vector<vk::UniqueImageView> Kale::Vulkan::SwapChain::imageViews

All available image views in this swap chain

Definition at line 77 of file SwapChain.hpp.

◆ support

SwapChainSupportDetails Kale::Vulkan::SwapChain::support

The swapchain support information

Definition at line 72 of file SwapChain.hpp.

◆ swapchain

vk::UniqueSwapchainKHR Kale::Vulkan::SwapChain::swapchain

The swapchain object

Definition at line 57 of file SwapChain.hpp.


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