CMSC23740 Common Code Library
Support code for CS23740 programming projects
Loading...
Searching...
No Matches
cs237::Attachment Class Reference

Frame-buffer attachments for off-screen rendering support. More...

#include <attachment.hpp>

Inheritance diagram for cs237::Attachment:
Collaboration diagram for cs237::Attachment:

Public Member Functions

 Attachment (cs237::Application *app, uint32_t wid, uint32_t ht, vk::Format fmt, vk::ImageUsageFlags usage)
 Construct a frame-buffer attachment.
 
 ~Attachment ()
 destructor
 
uint32_t width () const
 get the width of the buffer
 
uint32_t height () const
 get the height of the buffer
 
vk::Format format () const
 get the pixel format
 
vk::ImageView imageView () const
 return the image view for the attachment
 

Protected Attributes

cs237::Application_app
 the owning application
 
vk::Image _img
 Vulkan image to hold the attachment.
 
vk::DeviceMemory _mem
 device memory for the attachment image
 
vk::ImageView _view
 image view for attachment image
 
uint32_t _wid
 attachment width
 
uint32_t _ht
 attachment height
 
vk::Format _fmt
 the pixel format
 

Detailed Description

Frame-buffer attachments for off-screen rendering support.

Constructor & Destructor Documentation

◆ Attachment()

cs237::Attachment::Attachment ( cs237::Application * app,
uint32_t wid,
uint32_t ht,
vk::Format fmt,
vk::ImageUsageFlags usage )

Construct a frame-buffer attachment.

Parameters
appthe owning application
widthe width of the attachment
htthe height of the attachment
fmtthe pixel format of the attachment
usagethe way that this attachment is going to be used

◆ ~Attachment()

cs237::Attachment::~Attachment ( )

destructor

Member Function Documentation

◆ format()

vk::Format cs237::Attachment::format ( ) const
inline

get the pixel format

◆ height()

uint32_t cs237::Attachment::height ( ) const
inline

get the height of the buffer

◆ imageView()

vk::ImageView cs237::Attachment::imageView ( ) const
inline

return the image view for the attachment

◆ width()

uint32_t cs237::Attachment::width ( ) const
inline

get the width of the buffer

Member Data Documentation

◆ _app

cs237::Application* cs237::Attachment::_app
protected

the owning application

◆ _fmt

vk::Format cs237::Attachment::_fmt
protected

the pixel format

◆ _ht

uint32_t cs237::Attachment::_ht
protected

attachment height

◆ _img

vk::Image cs237::Attachment::_img
protected

Vulkan image to hold the attachment.

◆ _mem

vk::DeviceMemory cs237::Attachment::_mem
protected

device memory for the attachment image

◆ _view

vk::ImageView cs237::Attachment::_view
protected

image view for attachment image

◆ _wid

uint32_t cs237::Attachment::_wid
protected

attachment width


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