Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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// Qt-Security score:significant reason:default
5
6
7#ifndef QSSG_RENDER_DYNAMIC_OBJECT_SYSTEM_H
8#define QSSG_RENDER_DYNAMIC_OBJECT_SYSTEM_H
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an
15// implementation detail. This header file may change from version to
16// version without notice, or even be removed.
17//
18// We mean it.
19//
20
21#include <QtQuick3DUtils/private/qssgrenderbasetypes_p.h>
22#include <QtQuick3DUtils/private/qqsbcollection_p.h>
23
24#include <QtQuick3DRuntimeRender/private/qssgrendershadercache_p.h>
25#include <QtQuick3DRuntimeRender/private/qssgrendergraphobject_p.h>
26#include <QtQuick3DRuntimeRender/private/qssgrendershaderkeys_p.h>
27
28#include <QtGui/QVector2D>
29
30#include <QtCore/QString>
31#include <QtCore/QReadWriteLock>
32
33QT_BEGIN_NAMESPACE
34
35class QSSGRenderContextInterface;
36
69
70Q_DECLARE_OPERATORS_FOR_FLAGS(QSSGCustomShaderMetaData::Flags)
71
72class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGShaderLibraryManager
73{
74 Q_DISABLE_COPY(QSSGShaderLibraryManager)
75public:
76 typedef QHash<QByteArray, QByteArray> TPathDataMap;
78
83
85
87
89
90 explicit QSSGShaderLibraryManager();
91
92 ~QSSGShaderLibraryManager();
93
95
96 void setShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type,
97 const QByteArray &inSource, const QSSGCustomShaderMetaData &meta);
98
99 // Does not load any shaders, only information about the content of the pregenerated shaders
101
102 void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString);
103 QByteArray getIncludeContents(const QByteArray &inShaderPathKey);
104
105 QByteArray getShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
106 QSSGCustomShaderMetaData getShaderMetaData(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
107
108 void setShaderCodeLibraryVersion(const QByteArray &version);
109
110 static bool compare(const QSSGShaderDefaultMaterialKey &key1, const QSSGShaderDefaultMaterialKey &key2);
111};
112
113QT_END_NAMESPACE
114
115#endif
QSSGCustomShaderMetaData getShaderMetaData(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type)
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
QQsbCollection::EntryMap getParticleShaderEntries() const
QByteArray getIncludeContents(const QByteArray &inShaderPathKey)
void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString)
QQsbCollection::EntryMap m_preGeneratedShaderEntries
void setShaderCodeLibraryVersion(const QByteArray &version)
Combined button and popup list for selecting options.
static QByteArray copyrightHeaderStart()
#define COMPARE_PROP(x)
static QByteArray includeSearch()
static QByteArray copyrightHeaderEnd()
static char stageKey(QSSGShaderCache::ShaderType type)