8#include <QtQuick3DRuntimeRender/private/qssgrenderloadedtexture_p.h>
10#include <QXmlStreamReader>
12#include <QCryptographicHash>
14#include <QtQuick3DRuntimeRender/private/qssgruntimerenderlogging_p.h>
52 it.value() = inSource;
69 for (
int thePos = theReadBuffer.indexOf(
includeSearch()); thePos != -1;
70 thePos = theReadBuffer.indexOf(
includeSearch(), thePos + 1)) {
71 int theEndQuote = theReadBuffer.indexOf(
'\"', thePos +
includeSearch().
size() + 1);
73 if (theEndQuote == -1) {
74 qCCritical(INVALID_OPERATION,
"Unterminated include in file: %s", inMaterialInfoString.constData());
75 theReadBuffer.clear();
79 const auto &theInclude = theReadBuffer.mid(theActualBegin, theEndQuote - theActualBegin);
93 theReadBuffer = theReadBuffer.replace(thePos, (theEndQuote + 1) - thePos,
contents);
110 QSharedPointer<QIODevice> theStream;
114 if (theStream.isNull()) {
120 if (!theStream.isNull()) {
124 amountRead = theStream->read(readBuf, 1024);
126 theReadBuffer.append(readBuf,
int(amountRead));
127 }
while (amountRead);
134 theReadBuffer = theInsert.value();
140 return theReadBuffer;
152 qWarning(
"No shader source stored for key %s", perStageKey.constData());
165 qWarning(
"No shader metadata stored for key %s", perStageKey.constData());
190#define COMPARE_PROP(x) \
191 if (props.x.getValue(key1) < props.x.getValue(key2)) return true;
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
const_iterator constFind(const Key &key) const noexcept
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
const_iterator cend() const noexcept
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
static QByteArray shaderCollectionFile()
static QByteArray resourceFolder()
QSSGCustomShaderMetaData getShaderMetaData(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type)
void loadPregeneratedShaderInfo()
void setShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type, const QByteArray &inSource, const QSSGCustomShaderMetaData &meta)
QByteArray getShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type)
static bool compare(const QSSGShaderDefaultMaterialKey &key1, const QSSGShaderDefaultMaterialKey &key2)
QHash< QByteArray, QSSGCustomShaderMetaData > m_metadata
TPathDataMap m_expandedFiles
static QString getShaderCodeLibraryDirectory()
~QSSGShaderLibraryManager()
QByteArray getIncludeContents(const QByteArray &inShaderPathKey)
void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString)
QQsbCollection::EntryMap m_preGeneratedShaderEntries
QSSGShaderLibraryManager()
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QSet< QString >::iterator it
Combined button and popup list for selecting options.
#define QByteArrayLiteral(str)
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
#define qCCritical(category,...)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLsizei const GLenum * props
GLuint64EXT GLuint GLuint GLenum GLenum GLuint GLuint GLenum GLuint GLuint key1
static QByteArray copyrightHeaderStart()
static int calcLightPoint(const QSSGShaderDefaultMaterialKey &key, int i)
static QByteArray includeSearch()
static QByteArray copyrightHeaderEnd()
static char stageKey(QSSGShaderCache::ShaderType type)
#define qPrintable(string)
#define QStringLiteral(str)
\inmodule QtCore \reentrant
QSSGShaderKeyBoolean m_lightSpotFlags[LightCount]
QSSGShaderKeyBoolean m_lightAreaFlags[LightCount]
@ SingleChannelImageCount
QSSGShaderKeyBoolean m_lightFlags[LightCount]
QSSGShaderKeyBoolean m_lightShadowFlags[LightCount]
bool getValue(QSSGDataView< quint32 > inDataStore) const