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