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
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
31QT_BEGIN_NAMESPACE
32
33class QSSGRenderContextInterface;
34
66
67Q_DECLARE_OPERATORS_FOR_FLAGS(QSSGCustomShaderMetaData::Flags)
68
69class Q_QUICK3DRUNTIMERENDER_EXPORT QSSGShaderLibraryManager
70{
71 Q_DISABLE_COPY(QSSGShaderLibraryManager)
72public:
73 typedef QHash<QByteArray, QByteArray> TPathDataMap;
75
80
82
84
86
87 explicit QSSGShaderLibraryManager();
88
89 ~QSSGShaderLibraryManager();
90
91 void setShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type,
92 const QByteArray &inSource, const QSSGCustomShaderMetaData &meta);
93
94 // Does not load any shaders, only information about the content of the pregenerated shaders
96
97 void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString);
98 QByteArray getIncludeContents(const QByteArray &inShaderPathKey);
99
100 QByteArray getShaderSource(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
101 QSSGCustomShaderMetaData getShaderMetaData(const QByteArray &inShaderPathKey, QSSGShaderCache::ShaderType type);
102
103 void setShaderCodeLibraryVersion(const QByteArray &version);
104
105 static bool compare(const QSSGShaderDefaultMaterialKey &key1, const QSSGShaderDefaultMaterialKey &key2);
106};
107
108QT_END_NAMESPACE
109
110#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
QByteArray getIncludeContents(const QByteArray &inShaderPathKey)
void resolveIncludeFiles(QByteArray &theReadBuffer, const QByteArray &inMaterialInfoString)
QQsbCollection::EntryMap m_preGeneratedShaderEntries
void setShaderCodeLibraryVersion(const QByteArray &version)
static QByteArray copyrightHeaderStart()
#define COMPARE_PROP(x)
static QByteArray includeSearch()
static QByteArray copyrightHeaderEnd()
static char stageKey(QSSGShaderCache::ShaderType type)