VPP  0.8
A high-level modern C++ API for Vulkan
vpp::ImageAttributes< FormatT, PURPOSE, TYPE, USAGE, TILING, MULTISAMPLING, MIPMAPPED, ARRAYED, FLAGS > Struct Template Reference

A template containing image attributes inside C++ type. More...

#include <vppImage.hpp>

Detailed Description

template<class FormatT, EImagePurpose PURPOSE, EImageType TYPE, unsigned int USAGE, VkImageTiling TILING = VK_IMAGE_TILING_OPTIMAL, VkSampleCountFlagBits MULTISAMPLING = VK_SAMPLE_COUNT_1_BIT, bool MIPMAPPED = true, bool ARRAYED = false, unsigned int FLAGS = 0u>
struct vpp::ImageAttributes< FormatT, PURPOSE, TYPE, USAGE, TILING, MULTISAMPLING, MIPMAPPED, ARRAYED, FLAGS >

A template containing image 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 the first template you should typedef in order to make your custom image class.

Template Parameters
FormatTInstance of format< ... > template specifying the format.
PURPOSEPurpose of the image. Usually RENDER.
TYPEType of the image. This determines number of dimensions.
USAGEAllowed usage of the image. A bitwise sum of Img::EUsageFlags values.
TILINGImage tiling. Usually VK_IMAGE_TILING_OPTIMAL.
MULTISAMPLINGMultisampling mode (MSAA).
MIPMAPPEDWhether the image may contain multiple mip-maps.
ARRAYEDWhether the image may contain multiple array levels.

An example:

typedef vpp::format< vpp::unorm8_t, vpp::unorm8_t, vpp::unorm8_t, vpp::unorm8_t > MyColorFormat;
MyColorFormat,
vpp::IMG_TYPE_2D,
VK_IMAGE_TILING_OPTIMAL,
VK_SAMPLE_COUNT_1_BIT,
false,
false
> MyColorBufferAttr;

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