1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef GENSHADERS_H
5#define GENSHADERS_H
6
7#include "parser.h"
8
9#include <QtCore/qlist.h>
10
11#include <QtQuick3DRuntimeRender/private/qssgrendershaderkeys_p.h>
12#include <QtQuick3DRuntimeRender/private/qssgrhicontext_p.h>
13#include <QtQuick3DRuntimeRender/private/qssgrendershadercache_p.h>
14#include <QtQuick3DRuntimeRender/private/qssgrendershadercodegenerator_p.h>
15#include <QtQuick3DRuntimeRender/private/qssgrendershaderlibrarymanager_p.h>
16
17QT_BEGIN_NAMESPACE
18class QDir;
19class QQuick3DSceneManager;
20class QQuick3DWindowAttachment;
21QT_END_NAMESPACE
22
23struct GenShaders
24{
25 explicit GenShaders();
26 ~GenShaders();
27 bool process(const MaterialParser::SceneData &sceneData, QVector<QString> &qsbcFiles, const QDir &outDir,
28 bool generateMultipleLights, bool dryRun);
29
30 QRhi *rhi = nullptr;
31 std::shared_ptr<QSSGRenderContextInterface> renderContext;
32
33 QQuick3DSceneManager *sceneManager = nullptr;
34 QQuick3DWindowAttachment *wa = nullptr;
35};
36
37#endif
38

source code of qtquick3d/tools/shadergen/genshaders.h