VPP  0.7
A high-level modern C++ API for Vulkan
Public Member Functions | List of all members
vpp::FrameImageView Class Reference

Untyped image view class. Useful for constructing FrameBuffer objects. More...

#include <vppFrameImageView.hpp>

Public Member Functions

 FrameImageView ()
 Constructs null reference.
 
 FrameImageView (const Img &hImage, std::uint32_t layer=0)
 Constructs an image view for single layer of specified image. More...
 
 FrameImageView (const Img &hImage, const VkImageSubresourceRange &sr)
 Constructs an image view for multiple layers of specified image. More...
 
 FrameImageView (const SImageInfo &imageInfo, const Device &hDevice)
 Constructs both image view and image at once. More...
 
template<class MemoryT , class ResourceT >
 FrameImageView (const MemoryBinding< ResourceT, MemoryT > &binding, std::uint32_t layer=0)
 Constructs an image view for single layer of specified image. More...
 
 operator VkImageView () const
 Retrieves Vulkan handle of the view.
 
const Imgimage () const
 Retrieves the image.
 
const Devicedevice () const
 Retrieves the device.
 

Detailed Description

Untyped image view class. Useful for constructing FrameBuffer objects.

Sometimes it is useful to construct an image view without strictly defined type at compile time, for example if we have only a generic Img image reference.

FrameImageView provides such possibility. It is not a template, just plain class that can be constructed from Img object or SImageInfo structure.

This kind of image view can't be bound to rendering or computation pipelines, however it can be used to construct frame buffers and specify attachment targets.

This object is reference-counted and may be passed by value.

Constructor & Destructor Documentation

◆ FrameImageView() [1/4]

vpp::FrameImageView::FrameImageView ( const Img hImage,
std::uint32_t  layer = 0 
)
explicit

Constructs an image view for single layer of specified image.

The image is given as Img object. Also optionally provide the layer index. For arrayed images it will select single layer. This is useful in most cases of usage in output attachments, as these attachments are typically assumed to be single layered (although there may be exceptions).

◆ FrameImageView() [2/4]

vpp::FrameImageView::FrameImageView ( const Img hImage,
const VkImageSubresourceRange &  sr 
)

Constructs an image view for multiple layers of specified image.

The image is given as Img object. Also provide the resource range, defining layers, MIP levels and aspects covered by this view.

◆ FrameImageView() [3/4]

vpp::FrameImageView::FrameImageView ( const SImageInfo &  imageInfo,
const Device hDevice 
)

Constructs both image view and image at once.

This constructor creates an image from given SImageInfo structure and image view for it.

◆ FrameImageView() [4/4]

template<class MemoryT , class ResourceT >
vpp::FrameImageView::FrameImageView ( const MemoryBinding< ResourceT, MemoryT > &  binding,
std::uint32_t  layer = 0 
)

Constructs an image view for single layer of specified image.

A convenience wrapper for the single layer constructor, accepting a memory binding object containing the image.


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