ezEngine  Release 25.03
ezGALResourceFormat Struct Reference
Inheritance diagram for ezGALResourceFormat:

Public Types

enum  Enum : ezUInt8 {
  Invalid = 0, RGBAFloat, XYZWFloat = RGBAFloat, RGBAUInt,
  RGBAInt, RGBFloat, XYZFloat = RGBFloat, UVWFloat = RGBFloat,
  RGBUInt, RGBInt, B5G6R5UNormalized, BGRAUByteNormalized,
  BGRAUByteNormalizedsRGB, RGBAHalf, XYZWHalf = RGBAHalf, RGBAUShort,
  RGBAUShortNormalized, RGBAShort, RGBAShortNormalized, RGFloat,
  XYFloat = RGFloat, UVFloat = RGFloat, RGUInt, RGInt,
  RGB10A2UInt, RGB10A2UIntNormalized, RG11B10Float, RGBAUByteNormalized,
  RGBAUByteNormalizedsRGB, RGBAUByte, RGBAByteNormalized, RGBAByte,
  RGHalf, XYHalf = RGHalf, UVHalf = RGHalf, RGUShort,
  RGUShortNormalized, RGShort, RGShortNormalized, RGUByte,
  RGUByteNormalized, RGByte, RGByteNormalized, DFloat,
  RFloat, RUInt, RInt, RHalf,
  RUShort, RUShortNormalized, RShort, RShortNormalized,
  RUByte, RUByteNormalized, RByte, RByteNormalized,
  AUByteNormalized, D16, D24S8, BC1,
  BC1sRGB, BC2, BC2sRGB, BC3,
  BC3sRGB, BC4UNormalized, BC4Normalized, BC5UNormalized,
  BC5Normalized, BC6UFloat, BC6Float, BC7UNormalized,
  BC7UNormalizedsRGB, ENUM_COUNT, Default = RGBAUByteNormalizedsRGB
}
 
using StorageType = ezUInt8
 

Static Public Member Functions

static ezUInt32 GetBitsPerElement (ezGALResourceFormat::Enum format)
 The size in bits per element (usually pixels, except for mesh stream elements) of a single element of the given resource format.
 
static ezUInt8 GetChannelCount (ezGALResourceFormat::Enum format)
 The number of color channels this format contains.
 
static bool IsDepthFormat (ezGALResourceFormat::Enum format)
 Returns whether the given resource format is a depth format. More...
 
static bool IsStencilFormat (ezGALResourceFormat::Enum format)
 
static bool IsSrgb (ezGALResourceFormat::Enum format)
 
static bool IsBlockCompressed (ezGALResourceFormat::Enum format)
 
static bool IsIntegerFormat (ezGALResourceFormat::Enum format)
 Returns whether the given resource format returns integer values when sampled (e.g. RUShort). Note that normalized formats like RGUShortNormalized are not considered integer formats as they return float values in the [0..1] range when sampled.
 
static bool IsSignedFormat (ezGALResourceFormat::Enum format)
 Returns whether the given resource format can store negative values.
 
static bool IsFloatFormat (ezGALResourceFormat::Enum format)
 

Member Function Documentation

◆ IsDepthFormat()

EZ_FORCE_INLINE bool ezGALResourceFormat::IsDepthFormat ( ezGALResourceFormat::Enum  format)
static

Returns whether the given resource format is a depth format.

Todo:
A combination of propertyflags, something like srgb, normalized, ...

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