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

Depth-buffer attachment for off-screen rendering. More...

#include <attachment.hpp>

Inheritance diagram for cs237::DepthAttachment:
Collaboration diagram for cs237::DepthAttachment:

Public Member Functions

 DepthAttachment (cs237::Application *app, uint32_t wid, uint32_t ht)
 Construct a depth-buffer attachment using the "best" format for a depth buffer.
 
 ~DepthAttachment ()
 destructor
 
- Public Member Functions inherited from cs237::Attachment
 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
 

Additional Inherited Members

- Protected Attributes inherited from cs237::Attachment
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

Depth-buffer attachment for off-screen rendering.

Constructor & Destructor Documentation

◆ DepthAttachment()

cs237::DepthAttachment::DepthAttachment ( cs237::Application * app,
uint32_t wid,
uint32_t ht )
inline

Construct a depth-buffer attachment using the "best" format for a depth buffer.

Parameters
appthe owning application
widthe width of the attachment
htthe height of the attachment

◆ ~DepthAttachment()

cs237::DepthAttachment::~DepthAttachment ( )
inline

destructor


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