1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DEXTRAS_QPHONGMATERIAL_P_H
5#define QT3DEXTRAS_QPHONGMATERIAL_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 for the convenience
12// of other Qt classes. 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 <Qt3DRender/private/qmaterial_p.h>
19
20QT_BEGIN_NAMESPACE
21
22namespace Qt3DRender {
23
24class QFilterKey;
25class QEffect;
26class QTechnique;
27class QParameter;
28class QShaderProgram;
29class QShaderProgramBuilder;
30class QRenderPass;
31
32} // namespace Qt3DRender
33
34namespace Qt3DExtras {
35
36class QPhongMaterial;
37
38class QPhongMaterialPrivate : public Qt3DRender::QMaterialPrivate
39{
40public:
41 QPhongMaterialPrivate();
42
43 void init();
44
45 void handleAmbientChanged(const QVariant &var);
46 void handleDiffuseChanged(const QVariant &var);
47 void handleSpecularChanged(const QVariant &var);
48 void handleShininessChanged(const QVariant &var);
49
50 Qt3DRender::QEffect *m_phongEffect;
51 Qt3DRender::QParameter *m_ambientParameter;
52 Qt3DRender::QParameter *m_diffuseParameter;
53 Qt3DRender::QParameter *m_specularParameter;
54 Qt3DRender::QParameter *m_shininessParameter;
55 Qt3DRender::QTechnique *m_phongGL3Technique;
56 Qt3DRender::QTechnique *m_phongGL2Technique;
57 Qt3DRender::QTechnique *m_phongES2Technique;
58 Qt3DRender::QTechnique *m_phongRHITechnique;
59 Qt3DRender::QRenderPass *m_phongGL3RenderPass;
60 Qt3DRender::QRenderPass *m_phongGL2RenderPass;
61 Qt3DRender::QRenderPass *m_phongES2RenderPass;
62 Qt3DRender::QRenderPass *m_phongRHIRenderPass;
63 Qt3DRender::QShaderProgram *m_phongGL3Shader;
64 Qt3DRender::QShaderProgramBuilder *m_phongGL3ShaderBuilder;
65 Qt3DRender::QShaderProgram *m_phongGL2ES2Shader;
66 Qt3DRender::QShaderProgramBuilder *m_phongGL2ES2ShaderBuilder;
67 Qt3DRender::QShaderProgram *m_phongRHIShader;
68 Qt3DRender::QShaderProgramBuilder *m_phongRHIShaderBuilder;
69 Qt3DRender::QFilterKey *m_filterKey;
70
71 Q_DECLARE_PUBLIC(QPhongMaterial)
72};
73
74} // Qt3DExtras
75
76QT_END_NAMESPACE
77
78#endif // QT3DEXTRAS_QPHONGMATERIAL_P_H
79
80

source code of qt3d/src/extras/defaults/qphongmaterial_p.h