CMSC23700 Common Code Library
Support code for CS23700 programming projects
Loading...
Searching...
No Matches
cs237::Window::SwapChain Struct Reference

the collected information about the swap-chain for a window More...

#include <cs237-window.hpp>

Public Member Functions

 SwapChain (vk::Device dev)
 
int size () const
 return the number of buffers in the swap chain
 
void initFramebuffers (vk::RenderPass renderPass)
 allocate frame buffers for a rendering pass
 
bool hasDepthBuffer () const
 does the swap-chain support a depth buffer?
 
bool hasStencilBuffer () const
 does the swap-chain support a stencil buffer?
 
void cleanup ()
 destroy the Vulkan state for the swap chain
 

Public Attributes

vk::Device device
 the owning logical device
 
vk::SwapchainKHR chain
 the swap chain object
 
vk::Format imageFormat
 pixel format of image buffers
 
vk::Extent2D extent
 size of swap buffer images
 
int numAttachments
 the number of framebuffer attachments
 
std::vector< vk::Image > images
 images for the swap buffers
 
std::vector< vk::ImageView > views
 image views for the swap buffers
 
std::optional< DepthStencilBufferdsBuf
 optional depth/stencil-buffer
 
std::vector< vk::Framebuffer > fBufs
 frame buffers
 

Detailed Description

the collected information about the swap-chain for a window

Constructor & Destructor Documentation

◆ SwapChain()

cs237::Window::SwapChain::SwapChain ( vk::Device  dev)
inline

Member Function Documentation

◆ cleanup()

void cs237::Window::SwapChain::cleanup ( )

destroy the Vulkan state for the swap chain

◆ hasDepthBuffer()

bool cs237::Window::SwapChain::hasDepthBuffer ( ) const
inline

does the swap-chain support a depth buffer?

◆ hasStencilBuffer()

bool cs237::Window::SwapChain::hasStencilBuffer ( ) const
inline

does the swap-chain support a stencil buffer?

◆ initFramebuffers()

void cs237::Window::SwapChain::initFramebuffers ( vk::RenderPass  renderPass)

allocate frame buffers for a rendering pass

◆ size()

int cs237::Window::SwapChain::size ( ) const
inline

return the number of buffers in the swap chain

Member Data Documentation

◆ chain

vk::SwapchainKHR cs237::Window::SwapChain::chain

the swap chain object

◆ device

vk::Device cs237::Window::SwapChain::device

the owning logical device

◆ dsBuf

std::optional<DepthStencilBuffer> cs237::Window::SwapChain::dsBuf

optional depth/stencil-buffer

◆ extent

vk::Extent2D cs237::Window::SwapChain::extent

size of swap buffer images

◆ fBufs

std::vector<vk::Framebuffer> cs237::Window::SwapChain::fBufs

frame buffers

◆ imageFormat

vk::Format cs237::Window::SwapChain::imageFormat

pixel format of image buffers

◆ images

std::vector<vk::Image> cs237::Window::SwapChain::images

images for the swap buffers

◆ numAttachments

int cs237::Window::SwapChain::numAttachments

the number of framebuffer attachments

◆ views

std::vector<vk::ImageView> cs237::Window::SwapChain::views

image views for the swap buffers


The documentation for this struct was generated from the following file: