1// qsgmaterialrhishader.sip generated by MetaSIP
2//
3// This file is part of the QtQuick Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23%If (Qt_5_14_0 -)
24
25class QSGMaterialRhiShader : QSGMaterialShader
26{
27%TypeHeaderCode
28#include <qsgmaterialrhishader.h>
29%End
30
31public:
32    class RenderState
33    {
34%TypeHeaderCode
35#include <qsgmaterialrhishader.h>
36%End
37
38        typedef QSGMaterialShader::RenderState::DirtyStates DirtyStates;
39
40    public:
41        QSGMaterialRhiShader::RenderState::DirtyStates dirtyStates() const;
42        bool isMatrixDirty() const;
43        bool isOpacityDirty() const;
44        float opacity() const;
45        QMatrix4x4 combinedMatrix() const;
46        QMatrix4x4 modelViewMatrix() const;
47        QMatrix4x4 projectionMatrix() const;
48        QRect viewportRect() const;
49        QRect deviceRect() const;
50        float determinant() const;
51        float devicePixelRatio() const;
52        QByteArray *uniformData();
53    };
54
55    struct GraphicsPipelineState
56    {
57%TypeHeaderCode
58#include <qsgmaterialrhishader.h>
59%End
60
61        enum BlendFactor
62        {
63            Zero,
64            One,
65            SrcColor,
66            OneMinusSrcColor,
67            DstColor,
68            OneMinusDstColor,
69            SrcAlpha,
70            OneMinusSrcAlpha,
71            DstAlpha,
72            OneMinusDstAlpha,
73            ConstantColor,
74            OneMinusConstantColor,
75            ConstantAlpha,
76            OneMinusConstantAlpha,
77            SrcAlphaSaturate,
78            Src1Color,
79            OneMinusSrc1Color,
80            Src1Alpha,
81            OneMinusSrc1Alpha,
82        };
83
84        enum ColorMaskComponent
85        {
86            R,
87            G,
88            B,
89            A,
90        };
91
92        typedef QFlags<QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent> ColorMask;
93
94        enum CullMode
95        {
96            CullNone,
97            CullFront,
98            CullBack,
99        };
100    };
101
102    enum Flag
103    {
104        UpdatesGraphicsPipelineState,
105    };
106
107    typedef QFlags<QSGMaterialRhiShader::Flag> Flags;
108    QSGMaterialRhiShader();
109    virtual ~QSGMaterialRhiShader();
110    virtual bool updateUniformData(QSGMaterialRhiShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
111    virtual void updateSampledImage(QSGMaterialRhiShader::RenderState &state, int binding, QSGTexture **texture, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
112    virtual bool updateGraphicsPipelineState(QSGMaterialRhiShader::RenderState &state, QSGMaterialRhiShader::GraphicsPipelineState *ps, QSGMaterial *newMaterial, QSGMaterial *oldMaterial);
113    QSGMaterialRhiShader::Flags flags() const;
114    void setFlag(QSGMaterialRhiShader::Flags flags, bool on = true);
115};
116
117%End
118%If (Qt_5_14_0 -)
119QFlags<QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent> operator|(QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent f1, QFlags<QSGMaterialRhiShader::GraphicsPipelineState::ColorMaskComponent> f2);
120%End
121%If (Qt_5_14_0 -)
122QFlags<QSGMaterialRhiShader::Flag> operator|(QSGMaterialRhiShader::Flag f1, QFlags<QSGMaterialRhiShader::Flag> f2);
123%End
124