CMSC23740 Common Code Library
Support code for CS23740 programming projects
Loading...
Searching...
No Matches
cs237::Window::FrameData Struct Reference

A container for the per-frame rendering state. More...

#include <window.hpp>

Collaboration diagram for cs237::Window::FrameData:

Public Member Functions

 FrameData (Window *win)
 
 FrameData ()=delete
 
 FrameData (FrameData &)=delete
 
 FrameData (FrameData const &)=delete
 
 FrameData (FrameData &&)=delete
 
virtual ~FrameData ()
 Destructor.
 
void waitForFence ()
 wait for this frame's ‘inFlight’ fence
 
void resetFence ()
 reset this frame's inFlight fence
 
void submitDrawingCommands ()
 submit drawing commands for this frame using the main command buffer
 
vk::Result present ()
 present this frame
 

Public Attributes

Windowwin
 the owning window
 
vk::CommandBuffer cmdBuf
 
vk::Semaphore imageAvail
 
vk::Semaphore finished
 
vk::Fence inFlight
 
uint32_t index
 

Detailed Description

A container for the per-frame rendering state.

There is one of these objects per frame. Subclasses of the Window class may want to extend this structure with additional information so the window class defines a virtual function for allocating FrameData objects.

Constructor & Destructor Documentation

◆ FrameData() [1/5]

cs237::Window::FrameData::FrameData ( Window * win)

Constructor

Parameters
winthe owning window

This constructor initializes the win and synchronization components.

◆ FrameData() [2/5]

cs237::Window::FrameData::FrameData ( )
delete

◆ FrameData() [3/5]

cs237::Window::FrameData::FrameData ( FrameData & )
delete

◆ FrameData() [4/5]

cs237::Window::FrameData::FrameData ( FrameData const & )
delete

◆ FrameData() [5/5]

cs237::Window::FrameData::FrameData ( FrameData && )
delete

◆ ~FrameData()

virtual cs237::Window::FrameData::~FrameData ( )
virtual

Destructor.

Member Function Documentation

◆ present()

vk::Result cs237::Window::FrameData::present ( )
inline

present this frame

Returns
the return status of presenting the image

◆ resetFence()

void cs237::Window::FrameData::resetFence ( )
inline

reset this frame's inFlight fence

◆ submitDrawingCommands()

void cs237::Window::FrameData::submitDrawingCommands ( )

submit drawing commands for this frame using the main command buffer

◆ waitForFence()

void cs237::Window::FrameData::waitForFence ( )
inline

wait for this frame's ‘inFlight’ fence

Member Data Documentation

◆ cmdBuf

vk::CommandBuffer cs237::Window::FrameData::cmdBuf

the main command buffer for drawing to this frame

◆ finished

vk::Semaphore cs237::Window::FrameData::finished

semaphore for signaling when render pass is finished

◆ imageAvail

vk::Semaphore cs237::Window::FrameData::imageAvail

semaphore for signaling when the image object is available

◆ index

uint32_t cs237::Window::FrameData::index

the swap-chain image index for this frame This field is set by the window's _acquireNextImage method.

◆ inFlight

vk::Fence cs237::Window::FrameData::inFlight

fence for synchronizing on the termination of the rendering operation

◆ win

Window* cs237::Window::FrameData::win

the owning window


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