Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSSGRenderTextureFormat Struct Reference

#include <qssgrenderbasetypes_p.h>

+ Collaboration diagram for QSSGRenderTextureFormat:

Public Types

enum  Format : quint8 {
  Unknown = 0 , R8 , R16 , R16F ,
  R32I , R32UI , R32F , RG8 ,
  RGBA8 , RGB8 , SRGB8 , SRGB8A8 ,
  RGB565 , RGBA5551 , Alpha8 , Luminance8 ,
  Luminance16 , LuminanceAlpha8 , RGBA16F , RG16F ,
  RG32F , RGB32F , RGBA32F , R11G11B10 ,
  RGB9E5 , RGB10_A2 , RGB16F , RGBA32UI ,
  RGB32UI , RGBA16UI , RGB16UI , RGBA8UI ,
  RGB8UI , RGBA32I , RGB32I , RGBA16I ,
  RGB16I , RGBA8I , RGB8I , RGBE8 ,
  Depth16 = DepthTextureFlag + 1 , Depth24 , Depth32 , Depth24Stencil8 ,
  RGBA_DXT1 = CompressedTextureFlag + 1 , RGB_DXT1 , RGBA_DXT3 , RGBA_DXT5 ,
  R11_EAC_UNorm , R11_EAC_SNorm , RG11_EAC_UNorm , RG11_EAC_SNorm ,
  RGB8_ETC2 , SRGB8_ETC2 , RGB8_PunchThrough_Alpha1_ETC2 , SRGB8_PunchThrough_Alpha1_ETC2 ,
  RGBA8_ETC2_EAC , SRGB8_Alpha8_ETC2_EAC , RGBA_ASTC_4x4 , RGBA_ASTC_5x4 ,
  RGBA_ASTC_5x5 , RGBA_ASTC_6x5 , RGBA_ASTC_6x6 , RGBA_ASTC_8x5 ,
  RGBA_ASTC_8x6 , RGBA_ASTC_8x8 , RGBA_ASTC_10x5 , RGBA_ASTC_10x6 ,
  RGBA_ASTC_10x8 , RGBA_ASTC_10x10 , RGBA_ASTC_12x10 , RGBA_ASTC_12x12 ,
  SRGB8_Alpha8_ASTC_4x4 , SRGB8_Alpha8_ASTC_5x4 , SRGB8_Alpha8_ASTC_5x5 , SRGB8_Alpha8_ASTC_6x5 ,
  SRGB8_Alpha8_ASTC_6x6 , SRGB8_Alpha8_ASTC_8x5 , SRGB8_Alpha8_ASTC_8x6 , SRGB8_Alpha8_ASTC_8x8 ,
  SRGB8_Alpha8_ASTC_10x5 , SRGB8_Alpha8_ASTC_10x6 , SRGB8_Alpha8_ASTC_10x8 , SRGB8_Alpha8_ASTC_10x10 ,
  SRGB8_Alpha8_ASTC_12x10 , SRGB8_Alpha8_ASTC_12x12 , BC1 , BC2 ,
  BC3 , BC4 , BC5 , BC6H ,
  BC7
}
 

Public Member Functions

constexpr QSSGRenderTextureFormat (Format f)
 
constexpr bool isCompressedTextureFormat () const noexcept
 
constexpr bool isUncompressedTextureFormat () const noexcept
 
bool isDepthTextureFormat () const noexcept
 
const char * toString () const
 
qint32 getSizeofFormat () const noexcept
 
qint32 getNumberOfComponent () const noexcept
 
void decodeToFloat (void *inPtr, qint32 byteOfs, float *outPtr) const
 
void encodeToPixel (float *inPtr, void *outPtr, qint32 byteOfs) const
 
bool operator== (const QSSGRenderTextureFormat &other) const
 
bool operator!= (const QSSGRenderTextureFormat &other) const
 

Public Attributes

Format format
 

Static Public Attributes

static constexpr quint8 DepthTextureFlag = 1u << 6
 
static constexpr quint8 CompressedTextureFlag = 1u << 7
 

Detailed Description

Definition at line 64 of file qssgrenderbasetypes_p.h.

Member Enumeration Documentation

◆ Format

Enumerator
Unknown 
R8 
R16 
R16F 
R32I 
R32UI 
R32F 
RG8 
RGBA8 
RGB8 
SRGB8 
SRGB8A8 
RGB565 
RGBA5551 
Alpha8 
Luminance8 
Luminance16 
LuminanceAlpha8 
RGBA16F 
RG16F 
RG32F 
RGB32F 
RGBA32F 
R11G11B10 
RGB9E5 
RGB10_A2 
RGB16F 
RGBA32UI 
RGB32UI 
RGBA16UI 
RGB16UI 
RGBA8UI 
RGB8UI 
RGBA32I 
RGB32I 
RGBA16I 
RGB16I 
RGBA8I 
RGB8I 
RGBE8 
Depth16 
Depth24 
Depth32 
Depth24Stencil8 
RGBA_DXT1 
RGB_DXT1 
RGBA_DXT3 
RGBA_DXT5 
R11_EAC_UNorm 
R11_EAC_SNorm 
RG11_EAC_UNorm 
RG11_EAC_SNorm 
RGB8_ETC2 
SRGB8_ETC2 
RGB8_PunchThrough_Alpha1_ETC2 
SRGB8_PunchThrough_Alpha1_ETC2 
RGBA8_ETC2_EAC 
SRGB8_Alpha8_ETC2_EAC 
RGBA_ASTC_4x4 
RGBA_ASTC_5x4 
RGBA_ASTC_5x5 
RGBA_ASTC_6x5 
RGBA_ASTC_6x6 
RGBA_ASTC_8x5 
RGBA_ASTC_8x6 
RGBA_ASTC_8x8 
RGBA_ASTC_10x5 
RGBA_ASTC_10x6 
RGBA_ASTC_10x8 
RGBA_ASTC_10x10 
RGBA_ASTC_12x10 
RGBA_ASTC_12x12 
SRGB8_Alpha8_ASTC_4x4 
SRGB8_Alpha8_ASTC_5x4 
SRGB8_Alpha8_ASTC_5x5 
SRGB8_Alpha8_ASTC_6x5 
SRGB8_Alpha8_ASTC_6x6 
SRGB8_Alpha8_ASTC_8x5 
SRGB8_Alpha8_ASTC_8x6 
SRGB8_Alpha8_ASTC_8x8 
SRGB8_Alpha8_ASTC_10x5 
SRGB8_Alpha8_ASTC_10x6 
SRGB8_Alpha8_ASTC_10x8 
SRGB8_Alpha8_ASTC_10x10 
SRGB8_Alpha8_ASTC_12x10 
SRGB8_Alpha8_ASTC_12x12 
BC1 
BC2 
BC3 
BC4 
BC5 
BC6H 
BC7 

Definition at line 69 of file qssgrenderbasetypes_p.h.

Constructor & Destructor Documentation

◆ QSSGRenderTextureFormat()

constexpr QSSGRenderTextureFormat::QSSGRenderTextureFormat ( Format f)
inlineconstexpr

Definition at line 171 of file qssgrenderbasetypes_p.h.

Member Function Documentation

◆ decodeToFloat()

void QSSGRenderTextureFormat::decodeToFloat ( void * inPtr,
qint32 byteOfs,
float * outPtr ) const

Definition at line 325 of file qssgrenderbasetypes.cpp.

References Alpha8, getSizeofFormat(), i, Luminance8, LuminanceAlpha8, Q_ASSERT, R11G11B10, R16F, R32F, R8, RG16F, RG32F, RG8, RGB32F, RGB8, RGBA16F, RGBA32F, RGBA8, RGBE8, sign(), SRGB8, and SRGB8A8.

+ Here is the call graph for this function:

◆ encodeToPixel()

void QSSGRenderTextureFormat::encodeToPixel ( float * inPtr,
void * outPtr,
qint32 byteOfs ) const

Definition at line 411 of file qssgrenderbasetypes.cpp.

References Alpha8, getSizeofFormat(), i, Luminance8, LuminanceAlpha8, Q_ASSERT, qMax(), R11G11B10, R16F, R32F, R8, RG16F, RG32F, RG8, RGB32F, RGB8, RGBA16F, RGBA32F, RGBA8, RGBE8, sign(), SRGB8, and SRGB8A8.

+ Here is the call graph for this function:

◆ getNumberOfComponent()

qint32 QSSGRenderTextureFormat::getNumberOfComponent ( ) const
noexcept

Definition at line 263 of file qssgrenderbasetypes.cpp.

References Alpha8, Depth16, Depth24, Depth24Stencil8, Depth32, Luminance8, LuminanceAlpha8, Q_ASSERT, R11G11B10, R16, R16F, R32F, R32I, R8, RG16F, RG32F, RGB32F, RGB565, RGB8, RGB9E5, RGBA16F, RGBA32F, RGBA5551, RGBA8, RGBE8, SRGB8, and SRGB8A8.

Referenced by QSSGLoadedTexture::loadTextureData().

+ Here is the caller graph for this function:

◆ getSizeofFormat()

qint32 QSSGRenderTextureFormat::getSizeofFormat ( ) const
noexcept

Definition at line 202 of file qssgrenderbasetypes.cpp.

References Alpha8, Depth16, Depth24, Depth24Stencil8, Depth32, Luminance8, LuminanceAlpha8, Q_ASSERT, R11G11B10, R16, R16F, R32F, R32I, R8, RG16F, RG32F, RGB32F, RGB565, RGB8, RGB9E5, RGBA16F, RGBA32F, RGBA5551, RGBA8, RGBE8, SRGB8, and SRGB8A8.

Referenced by decodeToFloat(), encodeToPixel(), and QSSGLoadedTexture::loadTextureData().

+ Here is the caller graph for this function:

◆ isCompressedTextureFormat()

constexpr bool QSSGRenderTextureFormat::isCompressedTextureFormat ( ) const
inlineconstexprnoexcept

Definition at line 173 of file qssgrenderbasetypes_p.h.

Referenced by QSSGLoadedTexture::loadTextureData().

+ Here is the caller graph for this function:

◆ isDepthTextureFormat()

bool QSSGRenderTextureFormat::isDepthTextureFormat ( ) const
inlinenoexcept

Definition at line 183 of file qssgrenderbasetypes_p.h.

◆ isUncompressedTextureFormat()

constexpr bool QSSGRenderTextureFormat::isUncompressedTextureFormat ( ) const
inlineconstexprnoexcept

Definition at line 178 of file qssgrenderbasetypes_p.h.

◆ operator!=()

bool QSSGRenderTextureFormat::operator!= ( const QSSGRenderTextureFormat & other) const
inline

Definition at line 198 of file qssgrenderbasetypes_p.h.

References other().

+ Here is the call graph for this function:

◆ operator==()

bool QSSGRenderTextureFormat::operator== ( const QSSGRenderTextureFormat & other) const
inline

Definition at line 197 of file qssgrenderbasetypes_p.h.

References other().

+ Here is the call graph for this function:

◆ toString()

QT_BEGIN_NAMESPACE const char * QSSGRenderTextureFormat::toString ( ) const

Definition at line 8 of file qssgrenderbasetypes.cpp.

References Alpha8, BC1, BC2, BC3, BC4, BC5, BC6H, BC7, Depth16, Depth24, Depth24Stencil8, Depth32, Luminance16, Luminance8, LuminanceAlpha8, R11_EAC_SNorm, R11_EAC_UNorm, R11G11B10, R16, R16F, R32F, R32I, R32UI, R8, RG11_EAC_SNorm, RG11_EAC_UNorm, RG16F, RG32F, RG8, RGB10_A2, RGB16F, RGB16I, RGB16UI, RGB32F, RGB32I, RGB32UI, RGB565, RGB8, RGB8_ETC2, RGB8_PunchThrough_Alpha1_ETC2, RGB8I, RGB8UI, RGB9E5, RGB_DXT1, RGBA16F, RGBA16I, RGBA16UI, RGBA32F, RGBA32I, RGBA32UI, RGBA5551, RGBA8, RGBA8_ETC2_EAC, RGBA8I, RGBA8UI, RGBA_ASTC_10x10, RGBA_ASTC_10x5, RGBA_ASTC_10x6, RGBA_ASTC_10x8, RGBA_ASTC_12x10, RGBA_ASTC_12x12, RGBA_ASTC_4x4, RGBA_ASTC_5x4, RGBA_ASTC_5x5, RGBA_ASTC_6x5, RGBA_ASTC_6x6, RGBA_ASTC_8x5, RGBA_ASTC_8x6, RGBA_ASTC_8x8, RGBA_DXT1, RGBA_DXT3, RGBA_DXT5, RGBE8, SRGB8, SRGB8_Alpha8_ASTC_10x10, SRGB8_Alpha8_ASTC_10x5, SRGB8_Alpha8_ASTC_10x6, SRGB8_Alpha8_ASTC_10x8, SRGB8_Alpha8_ASTC_12x10, SRGB8_Alpha8_ASTC_12x12, SRGB8_Alpha8_ASTC_4x4, SRGB8_Alpha8_ASTC_5x4, SRGB8_Alpha8_ASTC_5x5, SRGB8_Alpha8_ASTC_6x5, SRGB8_Alpha8_ASTC_6x6, SRGB8_Alpha8_ASTC_8x5, SRGB8_Alpha8_ASTC_8x6, SRGB8_Alpha8_ASTC_8x8, SRGB8_Alpha8_ETC2_EAC, SRGB8_ETC2, SRGB8_PunchThrough_Alpha1_ETC2, SRGB8A8, and Unknown.

Referenced by QSSGAllocateBuffer::addDebug(), QSSGBindTarget::addDebug(), and QSSGBaseTypeHelpers::toString().

+ Here is the caller graph for this function:

Member Data Documentation

◆ CompressedTextureFlag

constexpr quint8 QSSGRenderTextureFormat::CompressedTextureFlag = 1u << 7
staticconstexpr

Definition at line 67 of file qssgrenderbasetypes_p.h.

◆ DepthTextureFlag

constexpr quint8 QSSGRenderTextureFormat::DepthTextureFlag = 1u << 6
staticconstexpr

Definition at line 66 of file qssgrenderbasetypes_p.h.

◆ format

Format QSSGRenderTextureFormat::format

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