Plasma Engine  2.0
Loading...
Searching...
No Matches
plGALResourceFormat Struct Reference
Inheritance diagram for plGALResourceFormat:

Public Types

enum  Enum : plUInt8 {
  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 = plUInt8
 

Static Public Member Functions

static plUInt32 GetBitsPerElement (plGALResourceFormat::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 plUInt8 GetChannelCount (plGALResourceFormat::Enum format)
 The number of color channels this format contains.
 
static bool IsDepthFormat (plGALResourceFormat::Enum format)
 Returns whether the given resource format is a depth format.
 
static bool IsStencilFormat (plGALResourceFormat::Enum format)
 
static bool IsSrgb (plGALResourceFormat::Enum format)
 
static bool IsIntegerFormat (plGALResourceFormat::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 (plGALResourceFormat::Enum format)
 Returns whether the given resource format can store negative values.
 

Member Function Documentation

◆ IsDepthFormat()

PL_FORCE_INLINE bool plGALResourceFormat::IsDepthFormat ( plGALResourceFormat::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: