Qt 6.x
The Qt SDK
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
36{
37 enum Flag {
40 UsesAoTexture = 1 << 2,
45 UsesVarColor = 1 << 7,
48 UsesLightmap = 1 << 10,
49 UsesSkinning = 1 << 11,
50 UsesMorphing = 1 << 12
51 };
53
57};
58
60
61class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGShaderLibraryManager
62{
63 Q_DISABLE_COPY(QSSGShaderLibraryManager)
64public:
67
72
74
76
77 static QString getShaderCodeLibraryDirectory();
78
79 explicit QSSGShaderLibraryManager();
80
82
83 void setShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type,
84 const QByteArray &inSource, const QSSGCustomShaderMetaData &meta);
85
86 // Does not load any shaders, only information about the content of the pregenerated shaders
87 void loadPregeneratedShaderInfo();
88
89 void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString);
90 QByteArray getIncludeContents(const QByteArray &inShaderPathKey);
91
92 QByteArray getShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
93 QSSGCustomShaderMetaData getShaderMetaData(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
94
96
98};
99
101
102#endif
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qhash.h:818
\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:127
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)