![]() |
VPP
0.7
A high-level modern C++ API for Vulkan
|
A template encoding image view attributes inside C++ type. More...
#include <vppImageView.hpp>
A template encoding image view attributes inside C++ type.
Advanced image usage in VPP (e.g. in shader code) requires that certain image attributes are known at compile time. This template allows to encode these attributes. This is additional template you should typedef
additionally to Image template, in order to define ypour image type.
ImageT | Instance of Image< ... > template specifying the image type. |
SAMPLING | Type of sampler to be associated with this image. Usually SAMPLER_NORMALIZED. |
FormatT | Format class to override image format. |
ASPECTS | Aspect mask. |
CUBE | Whether cube maps are supported by this view. |
If you specify the format (which is optional), it will override declared format of the image. This is quite like to reinterpret_cast
or union in C++. The formats should be compatible, which means that single pixel should occupy same area in memory. The pixel data will be reinterpreted according to the new format. See section 30.3.1 in official Vulkan docs (Format Compatibility Classes) for complete list of compatible formats.
An example: