Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSSGLoadedTexture Struct Reference

#include <qssgrenderloadedtexture_p.h>

+ Collaboration diagram for QSSGLoadedTexture:

Public Member Functions

 ~QSSGLoadedTexture ()
 
void setFormatFromComponents ()
 
bool scanForTransparency () const
 

Static Public Member Functions

static QSSGLoadedTextureload (const QString &inPath, const QSSGRenderTextureFormat &inFormat, bool inFlipY=true)
 
static QSSGLoadedTextureloadQImage (const QString &inPath, qint32 flipVertical)
 
static QSSGLoadedTextureloadCompressedImage (const QString &inPath)
 
static QSSGLoadedTextureloadHdrImage (const QSharedPointer< QIODevice > &source, const QSSGRenderTextureFormat &inFormat)
 
static QSSGLoadedTextureloadTextureData (QSSGRenderTextureData *textureData)
 

Public Attributes

qint32 width = 0
 
qint32 height = 0
 
qint32 depth = 0
 
qint32 components = 0
 
voiddata = nullptr
 
bool ownsData = true
 
QTextureFileData textureFileData
 
QImage image
 
quint32 dataSizeInBytes = 0
 
QSSGRenderTextureFormat format = QSSGRenderTextureFormat::RGBA8
 
bool isSRGB = false
 

Detailed Description

Definition at line 51 of file qssgrenderloadedtexture_p.h.

Constructor & Destructor Documentation

◆ ~QSSGLoadedTexture()

QSSGLoadedTexture::~QSSGLoadedTexture ( )

Definition at line 806 of file qssgrenderloadedtexture.cpp.

References ownsData.

Member Function Documentation

◆ load()

QSSGLoadedTexture * QSSGLoadedTexture::load ( const QString inPath,
const QSSGRenderTextureFormat inFormat,
bool  inFlipY = true 
)
static

Definition at line 933 of file qssgrenderloadedtexture.cpp.

References fileName, fileType(), QSSGInputUtil::getStreamForTextureFile(), QSSGInputUtil::HdrFile, QString::isEmpty(), loadCompressedImage(), loadCubeMap(), loadHdrImage(), loadQImage(), QSSGInputUtil::TextureFile, and QSSGInputUtil::UnknownFile.

Referenced by QSSGBufferManager::loadLightmap(), and QSSGBufferManager::loadRenderImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadCompressedImage()

QSSGLoadedTexture * QSSGLoadedTexture::loadCompressedImage ( const QString inPath)
static

Definition at line 310 of file qssgrenderloadedtexture.cpp.

References QImageReader::canRead(), QFileDevice::close(), format, fromGLtoTextureFormat(), QTextureFileData::glFormat(), QTextureFileData::glInternalFormat(), QSize::height(), height, QFile::open(), qWarning, QImageReader::read(), QIODeviceBase::ReadOnly, QTextureFileData::size(), textureFileData, QSize::width(), and width.

Referenced by load().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadHdrImage()

QSSGLoadedTexture * QSSGLoadedTexture::loadHdrImage ( const QSharedPointer< QIODevice > &  source,
const QSSGRenderTextureFormat inFormat 
)
static

Definition at line 700 of file qssgrenderloadedtexture.cpp.

References imageData, QSSGRenderTextureFormat::RGBA16F, and QSSGRenderTextureFormat::Unknown.

Referenced by load(), and renderToKTXFileInternal().

+ Here is the caller graph for this function:

◆ loadQImage()

QSSGLoadedTexture * QSSGLoadedTexture::loadQImage ( const QString inPath,
qint32  flipVertical 
)
static

Definition at line 291 of file qssgrenderloadedtexture.cpp.

References QImage::bits(), components, data, dataSizeInBytes, height, image, isSRGB, QColorSpace::Linear, loadImage(), setFormatFromComponents(), and width.

Referenced by load().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadTextureData()

◆ scanForTransparency()

◆ setFormatFromComponents()

void QSSGLoadedTexture::setFormatFromComponents ( )
inline

Definition at line 68 of file qssgrenderloadedtexture_p.h.

References QSSGRenderTextureFormat::R8, QSSGRenderTextureFormat::RG8, QSSGRenderTextureFormat::RGB8, and QSSGRenderTextureFormat::RGBA8.

Referenced by loadCubeMap(), and loadQImage().

+ Here is the caller graph for this function:

Member Data Documentation

◆ components

qint32 QSSGLoadedTexture::components = 0

Definition at line 57 of file qssgrenderloadedtexture_p.h.

Referenced by loadCubeMap(), and loadQImage().

◆ data

void* QSSGLoadedTexture::data = nullptr

Definition at line 58 of file qssgrenderloadedtexture_p.h.

Referenced by loadCubeMap(), and loadQImage().

◆ dataSizeInBytes

quint32 QSSGLoadedTexture::dataSizeInBytes = 0

Definition at line 62 of file qssgrenderloadedtexture_p.h.

Referenced by loadCubeMap(), and loadQImage().

◆ depth

qint32 QSSGLoadedTexture::depth = 0

Definition at line 56 of file qssgrenderloadedtexture_p.h.

◆ format

Definition at line 63 of file qssgrenderloadedtexture_p.h.

Referenced by loadCompressedImage().

◆ height

qint32 QSSGLoadedTexture::height = 0

Definition at line 55 of file qssgrenderloadedtexture_p.h.

Referenced by loadCompressedImage(), loadCubeMap(), and loadQImage().

◆ image

QImage QSSGLoadedTexture::image

Definition at line 61 of file qssgrenderloadedtexture_p.h.

Referenced by loadCubeMap(), and loadQImage().

◆ isSRGB

bool QSSGLoadedTexture::isSRGB = false

Definition at line 65 of file qssgrenderloadedtexture_p.h.

Referenced by loadCubeMap(), and loadQImage().

◆ ownsData

bool QSSGLoadedTexture::ownsData = true

Definition at line 59 of file qssgrenderloadedtexture_p.h.

Referenced by ~QSSGLoadedTexture().

◆ textureFileData

QTextureFileData QSSGLoadedTexture::textureFileData

Definition at line 60 of file qssgrenderloadedtexture_p.h.

Referenced by loadCompressedImage(), and loadCubeMap().

◆ width

qint32 QSSGLoadedTexture::width = 0

Definition at line 54 of file qssgrenderloadedtexture_p.h.

Referenced by loadCompressedImage(), loadCubeMap(), and loadQImage().


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