13#ifndef _CS237_DEPTH_BUFFER_HPP_
14#define _CS237_DEPTH_BUFFER_HPP_
17#error "cs237/depth-buffer.hpp should not be included directly"
47 uint32_t
width()
const {
return this->_wid; }
50 uint32_t
height()
const {
return this->_ht; }
53 vk::Format
format()
const {
return this->_fmt; }
56 vk::Sampler
sampler()
const {
return this->_sampler; }
59 vk::ImageView
imageView()
const {
return this->_imageView; }
64 return vk::DescriptorImageInfo(
67 vk::ImageLayout::eDepthStencilReadOnlyOptimal);
81 vk::ImageView _imageView;
82 vk::DeviceMemory _mem;
the base class for applications
Definition application.hpp:25
Definition depth-buffer.hpp:26
uint32_t height() const
get the height of the buffer
Definition depth-buffer.hpp:50
uint32_t width() const
get the width of the buffer
Definition depth-buffer.hpp:47
vk::DescriptorImageInfo imageInfo() const
get the image information for the depth buffer
Definition depth-buffer.hpp:62
vk::Format format() const
get the depth-buffer image format
Definition depth-buffer.hpp:53
vk::ImageView imageView() const
get the image view for the depth buffer
Definition depth-buffer.hpp:59
DepthBuffer(Application *app, uint32_t wid, uint32_t ht)
construct and initialize a new depth buffer of the give size
vk::Sampler sampler() const
get the sampler
Definition depth-buffer.hpp:56
vk::Framebuffer createFramebuffer(vk::RenderPass rp)
~DepthBuffer()
destructor; this will free the underlying resources