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
qssgrendershaderlibrarymanager_p.h
Go to the documentation of this file.
1// Copyright (C) 2008-2012 NVIDIA Corporation.
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5#ifndef QSSG_RENDER_DYNAMIC_OBJECT_SYSTEM_H
6#define QSSG_RENDER_DYNAMIC_OBJECT_SYSTEM_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick3DUtils/private/qssgrenderbasetypes_p.h>
20#include <QtQuick3DUtils/private/qqsbcollection_p.h>
21
22#include <QtQuick3DRuntimeRender/private/qssgrendershadercache_p.h>
23#include <QtQuick3DRuntimeRender/private/qssgrendergraphobject_p.h>
24#include <QtQuick3DRuntimeRender/private/qssgrendershaderkeys_p.h>
25
26#include <QtGui/QVector2D>
27
28#include <QtCore/QString>
29#include <QtCore/QReadWriteLock>
30
32
34
60
62
63class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGShaderLibraryManager
64{
65 Q_DISABLE_COPY(QSSGShaderLibraryManager)
66public:
67 typedef QHash<QByteArray, QByteArray> TPathDataMap;
68 typedef QSet<QString> TPathSet;
69
71 QHash<QByteArray, QSSGCustomShaderMetaData> m_metadata;
74
76
78
79 static QString getShaderCodeLibraryDirectory();
80
81 explicit QSSGShaderLibraryManager();
82
84
85 void setShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type,
86 const QByteArray &inSource, const QSSGCustomShaderMetaData &meta);
87
88 // Does not load any shaders, only information about the content of the pregenerated shaders
89 void loadPregeneratedShaderInfo();
90
91 void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString);
92 QByteArray getIncludeContents(const QByteArray &inShaderPathKey);
93
94 QByteArray getShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
95 QSSGCustomShaderMetaData getShaderMetaData(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
96
98
100};
101
103
104#endif
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
QHash< QByteArray, QSSGCustomShaderMetaData > m_metadata
QQsbCollection::EntryMap m_preGeneratedShaderEntries
QHash< QByteArray, QByteArray > TPathDataMap
void setShaderCodeLibraryVersion(const QByteArray &version)
Definition qset.h:18
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
Flags
GLenum type
GLbitfield flags
GLuint64EXT GLuint GLuint GLenum GLenum GLuint GLuint GLenum GLuint GLuint key1
static int compare(quint64 a, quint64 b)