13#ifndef _CS237_ATTACHMENT_HPP_
14#define _CS237_ATTACHMENT_HPP_
17#error "cs237/attachment.hpp should not be included directly"
37 vk::ImageUsageFlags usage);
76 app->_depthStencilBufferFormat(true, false),
77 vk::ImageUsageFlagBits::eDepthStencilAttachment)
the base class for applications
Definition application.hpp:25
Frame-buffer attachments for off-screen rendering support.
Definition attachment.hpp:23
vk::ImageView _view
image view for attachment image
Definition attachment.hpp:58
vk::DeviceMemory _mem
device memory for the attachment image
Definition attachment.hpp:57
uint32_t _wid
attachment width
Definition attachment.hpp:59
vk::Format _fmt
the pixel format
Definition attachment.hpp:61
Attachment(cs237::Application *app, uint32_t wid, uint32_t ht, vk::Format fmt, vk::ImageUsageFlags usage)
Construct a frame-buffer attachment.
uint32_t height() const
get the height of the buffer
Definition attachment.hpp:46
uint32_t _ht
attachment height
Definition attachment.hpp:60
uint32_t width() const
get the width of the buffer
Definition attachment.hpp:43
vk::ImageView imageView() const
return the image view for the attachment
Definition attachment.hpp:52
vk::Format format() const
get the pixel format
Definition attachment.hpp:49
vk::Image _img
Vulkan image to hold the attachment.
Definition attachment.hpp:56
cs237::Application * _app
the owning application
Definition attachment.hpp:55
Depth-buffer attachment for off-screen rendering.
Definition attachment.hpp:66
~DepthAttachment()
destructor
Definition attachment.hpp:81
DepthAttachment(cs237::Application *app, uint32_t wid, uint32_t ht)
Construct a depth-buffer attachment using the "best" format for a depth buffer.
Definition attachment.hpp:74