1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSGRENDERSHADERMETADATA_P_H
5#define QSSGRENDERSHADERMETADATA_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qbytearray.h>
19#include <QtCore/qvector.h>
20#include <QtQuick3DRuntimeRender/private/qssgrendershadercodegenerator_p.h>
21
22namespace QSSGRenderShaderMetadata {
23
24struct Uniform
25{
26 enum Condition {
27 None,
28 Regular,
29 Negated
30 };
31
32 QByteArray type;
33 Condition condition = Condition::None;
34 QByteArray name;
35 QByteArray conditionName;
36 bool multiview = false;
37
38 static Condition conditionFromString(const QString &condition);
39};
40
41struct InputOutput
42{
43 QByteArray type;
44 QSSGShaderGeneratorStage stage = QSSGShaderGeneratorStage::Vertex;
45 QByteArray name;
46 bool flat = false;
47
48 static QSSGShaderGeneratorStage stageFromString(const QString &stage);
49};
50
51struct ShaderMetaData
52{
53 QVector<Uniform> uniforms;
54 QVector<InputOutput> inputs;
55 QVector<InputOutput> outputs;
56};
57
58ShaderMetaData getShaderMetaData(const QByteArray &data);
59
60} // namespace
61
62#endif // QSSGRENDERSHADERMETADATA_H
63

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

source code of qtquick3d/src/runtimerender/qssgrendershadermetadata_p.h