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_RENDERABLE_IMAGE_H |
6 | #define QSSG_RENDERABLE_IMAGE_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 <QtQuick3DRuntimeRender/private/qtquick3druntimerenderglobal_p.h> |
20 | #include <QtQuick3DRuntimeRender/private/qssgrenderimage_p.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | // Some precomputed information on a given image. When generating a renderable, |
25 | // the layer preparation step goes through all the possible images on a |
26 | // material (which includes all regular texture maps, but does not include |
27 | // light probes or custom texture properties for custom materials), and for |
28 | // each valid image it generates, if not already done, the QRhiTexture (for the |
29 | // current scene's window, and so render thread), and calculates some other |
30 | // data and flags. |
31 | |
32 | struct QSSGRenderableImage |
33 | { |
34 | enum class Type : quint8 { |
35 | Unknown = 0, |
36 | Diffuse, |
37 | Opacity, |
38 | Specular, |
39 | Emissive, |
40 | Bump, |
41 | SpecularAmountMap, |
42 | Normal, |
43 | Translucency, |
44 | Roughness, |
45 | BaseColor, |
46 | Metalness, |
47 | Occlusion, |
48 | Height, |
49 | Clearcoat, |
50 | ClearcoatRoughness, |
51 | ClearcoatNormal, |
52 | Transmission, |
53 | Thickness |
54 | }; |
55 | const QSSGRenderImage &m_imageNode; |
56 | QSSGRenderImageTexture m_texture; |
57 | QSSGRenderableImage *m_nextImage; |
58 | Type m_mapType; |
59 | QSSGRenderableImage(Type inMapType, const QSSGRenderImage &inImageNode, const QSSGRenderImageTexture &inTexture) |
60 | : m_imageNode(inImageNode), m_texture(inTexture), m_nextImage(nullptr), m_mapType(inMapType) |
61 | { |
62 | } |
63 | }; |
64 | QT_END_NAMESPACE |
65 | #endif |
66 | |