XII Release 0.1.0
Loading...
Searching...
No Matches
xiiSourceFormat Struct Reference

Describes the format of pixel data used for textures and attachments in the rendering pipeline. More...

#include <Declarations.h>

Inheritance diagram for xiiSourceFormat:
[legend]

Public Types

enum  Enum : StorageType {
  Color4Channel8BitNormalized_sRGB = 0U , Color4Channel8BitNormalized , Color2Channel16BitFloat , Color4Channel16BitFloat ,
  Color2Channel32BitFloat , Color3Channel32BitFloat , Color4Channel32BitFloat , Color3Channel11_11_10BitFloat ,
  Depth16Bit , Depth24BitStencil8Bit , Depth32BitFloat , BC1_RGB_DXT1 ,
  BC2_RGBA_DXT3 , BC3_RGBA_DXT5 , BC4_R_Grey_DXT5A , BC5_RG_Grey_DXT5A ,
  BC6H_RGB_Float , BC7_RGBA , ENUM_COUNT , Default = Color4Channel8BitNormalized_sRGB
}
 
using StorageType = xiiUInt8
 

Static Public Member Functions

static xiiGALResourceFormat::Enum GetGALResourceFormat (xiiSourceFormat::Enum format, bool bFlipColorChannels=false)
 Converts a xiiSourceFormat into its corresponding xiiGALResourceFormat for low-level use.
 

Detailed Description

Describes the format of pixel data used for textures and attachments in the rendering pipeline.

The source format determines how color, depth, or compressed texture data is stored and interpreted during rendering. It includes both uncompressed and block-compressed formats, floating-point precision options, and sRGB or linear variants.

These formats are typically used when specifying render target formats, texture asset loading, or framebuffer attachment configurations.

Member Enumeration Documentation

◆ Enum

enum xiiSourceFormat::Enum : StorageType
Enumerator
Color4Channel8BitNormalized_sRGB 

8-bit RGBA, normalized, stored in sRGB color space (default).

Color4Channel8BitNormalized 

8-bit RGBA, normalized, stored in linear color space.

Color2Channel16BitFloat 

16-bit float RG format.

Color4Channel16BitFloat 

16-bit float RGBA format.

Color2Channel32BitFloat 

32-bit float RG format.

Color3Channel32BitFloat 

32-bit float RGB format.

Color4Channel32BitFloat 

32-bit float RGBA format.

Color3Channel11_11_10BitFloat 

Packed 11-11-10 bit RGB float format.

Depth16Bit 

16-bit depth-only format.

Depth24BitStencil8Bit 

Combined 24-bit depth and 8-bit stencil format.

Depth32BitFloat 

32-bit float depth-only format.

BC1_RGB_DXT1 

Block-compressed DXT1 format for RGB (no alpha).

BC2_RGBA_DXT3 

Block-compressed DXT3 format for RGBA.

BC3_RGBA_DXT5 

Block-compressed DXT5 format for RGBA.

BC4_R_Grey_DXT5A 

Block-compressed DXT5A format for single-channel grayscale.

BC5_RG_Grey_DXT5A 

Block-compressed DXT5A format for dual-channel grayscale.

BC6H_RGB_Float 

High dynamic range RGB compression (BC6H).

BC7_RGBA 

High-quality block compression for RGBA (BC7).

Member Function Documentation

◆ GetGALResourceFormat()

xiiGALResourceFormat::Enum xiiSourceFormat::GetGALResourceFormat ( xiiSourceFormat::Enum format,
bool bFlipColorChannels = false )
static

Converts a xiiSourceFormat into its corresponding xiiGALResourceFormat for low-level use.

Parameters
format- The source format to translate.
bFlipColorChannels- Whether to flip color channel order during conversion (optional).
Returns
The corresponding GAL format enum usable in GPU resource creation.

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