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
qssgiblbaker.cpp File Reference

(a0ded38e4c0d5ab601e2b13df3ddee2f0073827c)

#include "qssgiblbaker_p.h"
#include <QFile>
#include <QFileInfo>
#include <QScopeGuard>
#include <QtQuick3DRuntimeRender/private/qssgrhicontext_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrenderloadedtexture_p.h>
#include <QtQuick3DRuntimeRender/private/qssgrendershadercache_p.h>
+ Include dependency graph for qssgiblbaker.cpp:

Go to the source code of this file.

Macros

#define GL_FLOAT   0x1406
 
#define GL_HALF_FLOAT   0x140B
 
#define GL_UNSIGNED_BYTE   0x1401
 
#define GL_RGBA   0x1908
 
#define GL_RGBA8   0x8058
 
#define GL_RGBA16F   0x881A
 
#define GL_RGBA32F   0x8814
 

Functions

static constexpr QSSGRenderTextureFormat FORMAT (QSSGRenderTextureFormat::RGBA16F)
 
QString renderToKTXFileInternal (const char *name, const QString &inPath, const QString &outPath, QRhi::Implementation impl, QRhiInitParams *initParams)
 
void adjustToPlatformQuirks (QRhi::Implementation &impl)
 
QRhi::Implementation getRhiImplementation ()
 
QString renderToKTXFile (const QString &inPath, const QString &outPath)
 

Variables

static const float cube []
 

Macro Definition Documentation

◆ GL_FLOAT

◆ GL_HALF_FLOAT

#define GL_HALF_FLOAT   0x140B

Definition at line 21 of file qssgiblbaker.cpp.

Referenced by renderToKTXFileInternal().

◆ GL_RGBA

◆ GL_RGBA16F

#define GL_RGBA16F   0x881A

Definition at line 25 of file qssgiblbaker.cpp.

Referenced by renderToKTXFileInternal().

◆ GL_RGBA32F

#define GL_RGBA32F   0x8814

Definition at line 26 of file qssgiblbaker.cpp.

◆ GL_RGBA8

#define GL_RGBA8   0x8058

Definition at line 24 of file qssgiblbaker.cpp.

◆ GL_UNSIGNED_BYTE

Function Documentation

◆ adjustToPlatformQuirks()

void adjustToPlatformQuirks ( QRhi::Implementation & impl)

Definition at line 580 of file qssgiblbaker.cpp.

References QRhi::create(), QRhi::Metal, QRhi::OpenGLES2, Q_UNUSED, and qDebug.

Referenced by getRhiImplementation().

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

◆ FORMAT()

static constexpr QSSGRenderTextureFormat FORMAT ( QSSGRenderTextureFormat::RGBA16F )
staticconstexpr

Referenced by renderToKTXFileInternal().

+ Here is the caller graph for this function:

◆ getRhiImplementation()

QRhi::Implementation getRhiImplementation ( )

Definition at line 601 of file qssgiblbaker.cpp.

References adjustToPlatformQuirks(), QByteArray::constData(), QRhi::D3D11, QRhi::D3D12, QByteArray::isEmpty(), QRhi::Metal, QRhi::Null, QRhi::OpenGLES2, QByteArrayLiteral, qgetenv(), qWarning, and QRhi::Vulkan.

Referenced by renderToKTXFile().

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

◆ renderToKTXFile()

QString renderToKTXFile ( const QString & inPath,
const QString & outPath )

Definition at line 640 of file qssgiblbaker.cpp.

References QSurfaceFormat::CoreProfile, QRhi::D3D11, QRhi::D3D12, getRhiImplementation(), QOpenGLContext::LibGL, QRhi::Metal, QRhi::OpenGLES2, QOpenGLContext::openGLModuleType(), QStringLiteral, renderToKTXFileInternal(), and QRhi::Vulkan.

Referenced by QSSGIblBaker::import().

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

◆ renderToKTXFileInternal()

QString renderToKTXFileInternal ( const char * name,
const QString & inPath,
const QString & outPath,
QRhi::Implementation impl,
QRhiInitParams * initParams )

Definition at line 100 of file qssgiblbaker.cpp.

References cb, QRhiTextureRenderTargetDescription::cbeginColorAttachments(), QRhiGraphicsPipeline::CCW, QRhiSampler::ClampToEdge, QRhiRenderBuffer::Color, QRhiBuffer::create(), QRhi::create(), cube, QRhiTexture::CubeMap, QRhiResource::deleteLater(), QRhiTextureRenderTarget::description(), QRhiBuffer::Dynamic, QRhiVertexInputAttribute::Float3, FORMAT(), QRhiShaderResourceBinding::FragmentStage, QRhiGraphicsPipeline::Front, QSSGRhiContextPrivate::get(), QSSGInputUtil::getStreamForFile(), GL_HALF_FLOAT, GL_RGBA, GL_RGBA16F, QRhiBuffer::Immutable, KTX_IDENTIFIER_LENGTH, ktxIdentifier, QRhiGraphicsPipeline::LessOrEqual, QRhiSampler::Linear, QSSGLoadedTexture::loadHdrImage(), QMatrix4x4::lookAt(), QRhiTexture::MipMapped, QRhiSampler::None, platformEndianIdentifier, Q_ASSERT, qDebug, qMax(), qMin(), QStringLiteral, qWarning, QRhiTexture::RenderTarget, QRhiSampler::Repeat, QRhiTexture::RGBA16F, QSSGRenderTextureFormat::RGBE8, QRhiShaderResourceBinding::sampledTexture(), QRhiVertexInputLayout::setAttributes(), QRhiVertexInputLayout::setBindings(), QRhiTextureRenderTargetDescription::setColorAttachments(), QRhiColorAttachment::setLayer(), QRhiColorAttachment::setLevel(), QRhiColorAttachment::texture(), QRhiBuffer::UniformBuffer, QRhiShaderResourceBinding::uniformBufferWithDynamicOffset(), QRhiTexture::UsedWithGenerateMips, QRhiBuffer::VertexBuffer, QRhiShaderResourceBinding::VertexStage, and QIODeviceBase::WriteOnly.

Referenced by renderToKTXFile().

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

Variable Documentation

◆ cube

const float cube[]
static

Definition at line 62 of file qssgiblbaker.cpp.

Referenced by renderToKTXFileInternal().