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
76
77Q_DECLARE_OPERATORS_FOR_FLAGS(QSSGCustomShaderMetaData::Flags)
78
79class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGShaderLibraryManager
80{
81 Q_DISABLE_COPY(QSSGShaderLibraryManager)
82public:
83 typedef QHash<QByteArray, QByteArray> TPathDataMap;
85
90
92
94
96
97 explicit QSSGShaderLibraryManager();
98
99 ~QSSGShaderLibraryManager();
100
102
103 void setShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type,
104 const QByteArray &inSource, const QSSGCustomShaderMetaData &meta);
105
106 // Does not load any shaders, only information about the content of the pregenerated shaders
108
109 void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString);
110 QByteArray getIncludeContents(const QByteArray &inShaderPathKey);
111
112 QByteArray getShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
113 QSSGCustomShaderMetaData getShaderMetaData(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
114
115 void setShaderCodeLibraryVersion(const QByteArray &version);
116
117 static bool compare(const QSSGShaderDefaultMaterialKey &key1, const QSSGShaderDefaultMaterialKey &key2);
118};
119
120QT_END_NAMESPACE
121
122#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)