vOOlkan
An object oriented approach to Vulkan
DepthImage.h
Go to the documentation of this file.
1#ifndef VULKAN_DEPTHIMAGE
2#define VULKAN_DEPTHIMAGE
3
4#include <vulkan/vulkan.h>
5
6#include "Image.h"
7#include "LogicalDevice.h"
8#include "PhysicalDevice.h"
9
10
11namespace Vulkan { class DepthImage; }
12
14public:
15 DepthImage(const LogicalDevice& virtualGpu, const PhysicalDevice& realGpu, std::pair<unsigned int, unsigned int> resolution)
16 : Image{ virtualGpu, realGpu, VK_FORMAT_D32_SFLOAT, resolution, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT }
17 {
18 generateImageView("base", virtualGpu, VK_IMAGE_ASPECT_DEPTH_BIT);
19 }
20
21 DepthImage(const DepthImage&) = delete;
22 DepthImage& operator=(const DepthImage&) = delete;
23 DepthImage(DepthImage&&) = default;
24 DepthImage& operator=(DepthImage&& movedFrom) = default;
25
26 ~DepthImage() = default;
27};
28
29
30
31#endif
Definition: DepthImage.h:13
DepthImage & operator=(DepthImage &&movedFrom)=default
DepthImage(const DepthImage &)=delete
DepthImage & operator=(const DepthImage &)=delete
DepthImage(DepthImage &&)=default
~DepthImage()=default
DepthImage(const LogicalDevice &virtualGpu, const PhysicalDevice &realGpu, std::pair< unsigned int, unsigned int > resolution)
Definition: DepthImage.h:15
An Image is an object representing what can be passed to the swapchain: the content of the image is w...
Definition: Image.h:19
std::pair< unsigned int, unsigned int > resolution
Definition: Image.h:126
LogicalDevice const * virtualGpu
Definition: Image.h:129
const ImageView & generateImageView(std::string tag, const LogicalDevice &virtualGpu, VkImageAspectFlags type=VK_IMAGE_ASPECT_COLOR_BIT)
Creates a new image view for this image, and adds it to the array of image views of this image,...
Definition: Image.cpp:63
A logical device is an abstraction of the physical GPU which we can mainly use to send commands.
Definition: LogicalDevice.h:15
Represents the GPU (or any other device) that will be used with Vulkan to perform computer graphics.
Definition: PhysicalDevice.h:17
Types of queue families.
Definition: Animations.h:17