CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUImageDescriptor Struct Referencefinal

#include <CeresEngine/RenderAPI/GPUImage.hpp>

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Public Attributes

GPUImageType type = GPUImageType::Image2D
 Hardware image type. By default ImageType::Image2D.
 
GPUImageUsage usage = GPUImageUsageFlags::Sample
 A mask of possible usages for the image.
 
GPUMemoryProperties memoryProperty = GPUMemoryProperty::DeviceLocal
 The image memory properties.
 
Format format = Format::RGBA8UNorm
 Hardware image format. By default Format::RGBA8UNorm.
 
TExtent3< UInt32extent = {1, 1, 1}
 Image extent.
 
UInt32 arrayLayers = 1
 Number of array layers.
 
UInt32 mipLevels = 1
 Number of MIP-map levels.
 
UInt32 samples = 1
 Number of samples per texel.
 
GPUImageLayout initialLayout = GPUImageLayout::DontCare
 The layout the image should be initially created at.
 
String name
 A user-facing name for the image. This is only used for debugging.
 

Friends

bool operator== (const GPUImageDescriptor &lhs, const GPUImageDescriptor &rhs)
 
bool operator!= (const GPUImageDescriptor &lhs, const GPUImageDescriptor &rhs)
 

Member Function Documentation

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::GPUImageDescriptor::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

Friends And Related Symbol Documentation

◆ operator!=

◆ operator==

bool operator== ( const GPUImageDescriptor lhs,
const GPUImageDescriptor rhs 
)
friend

Member Data Documentation

◆ arrayLayers

UInt32 CeresEngine::GPUImageDescriptor::arrayLayers = 1

Number of array layers.

By default 1.

Remarks
This can be greater than 1 for array images and cube images (i.e. image1DArray, image2DArray, imageCube, imageCubeArray, image2DMSArray). For cube images, this must be a multiple of 6 (one array layer for each cube face). For all other image types, this must be 1. The index offsets for each cube face are as follows:
  • X+ direction has index offset 0.
  • X- direction has index offset 1.
  • Y+ direction has index offset 2.
  • Y- direction has index offset 3.
  • Z+ direction has index offset 4.
  • Z- direction has index offset 5.

◆ extent

TExtent3<UInt32> CeresEngine::GPUImageDescriptor::extent = {1, 1, 1}

Image extent.

By default (1, 1, 1).

Remarks
The height component is only used for 2D, 3D, and Cube images (i.e. ImageType::Image2D, ImageType::Image2DArray, ImageType::Image3D, ImageType::ImageCube, ImageType::ImageCubeArray, ImageType::Image2DMS, ImageType::Image2DMSArray). The depth component is only used for 3D images (i.e. ImageType::Image3D). For cube images, the width and height component must be equal.

◆ format

Format CeresEngine::GPUImageDescriptor::format = Format::RGBA8UNorm

Hardware image format. By default Format::RGBA8UNorm.

◆ initialLayout

GPUImageLayout CeresEngine::GPUImageDescriptor::initialLayout = GPUImageLayout::DontCare

The layout the image should be initially created at.

◆ memoryProperty

GPUMemoryProperties CeresEngine::GPUImageDescriptor::memoryProperty = GPUMemoryProperty::DeviceLocal

The image memory properties.

◆ mipLevels

UInt32 CeresEngine::GPUImageDescriptor::mipLevels = 1

Number of MIP-map levels.

By default 1.

Remarks
If this is 0, the full MIP-chain will be generated. If this is 1, no MIP-mapping is used for this image and it has only a MIP level. This field is ignored for multi-sampled images (i.e. image2DMS, image2DMSArray), since these image types only have a single MIP-map level.

◆ name

String CeresEngine::GPUImageDescriptor::name

A user-facing name for the image. This is only used for debugging.

◆ samples

UInt32 CeresEngine::GPUImageDescriptor::samples = 1

Number of samples per texel.

By default 1.

Remarks
This is only used for multi-sampled images (i.e. image2DMS and image2DMSArray). The equivalent member for graphics pipeline states is MultiSamplingDescriptor::samples.

◆ type

GPUImageType CeresEngine::GPUImageDescriptor::type = GPUImageType::Image2D

Hardware image type. By default ImageType::Image2D.

◆ usage

GPUImageUsage CeresEngine::GPUImageDescriptor::usage = GPUImageUsageFlags::Sample

A mask of possible usages for the image.


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