1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2// Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QT3DRENDER_QDEPTHTEST_H
6#define QT3DRENDER_QDEPTHTEST_H
7
8#include <Qt3DRender/qrenderstate.h>
9
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DRender {
13
14class QDepthTestPrivate;
15
16class Q_3DRENDERSHARED_EXPORT QDepthTest : public QRenderState
17{
18 Q_OBJECT
19 Q_PROPERTY(DepthFunction depthFunction READ depthFunction WRITE setDepthFunction NOTIFY depthFunctionChanged)
20public:
21
22 enum DepthFunction {
23 Never = 0x0200,
24 Always = 0x0207,
25 Less = 0x0201,
26 LessOrEqual = 0x0203,
27 Equal = 0x0202,
28 GreaterOrEqual = 0x0206,
29 Greater = 0x0204,
30 NotEqual = 0x0205
31 };
32 Q_ENUM(DepthFunction) // LCOV_EXCL_LINE
33
34 explicit QDepthTest(Qt3DCore::QNode *parent = nullptr);
35 ~QDepthTest();
36
37 DepthFunction depthFunction() const;
38
39public Q_SLOTS:
40 void setDepthFunction(DepthFunction depthFunction);
41
42Q_SIGNALS:
43 void depthFunctionChanged(DepthFunction depthFunction);
44
45private:
46 Q_DECLARE_PRIVATE(QDepthTest)
47};
48
49} // namespace Qt3DRender
50
51QT_END_NAMESPACE
52
53#endif // QT3DRENDER_QDEPTHTEST_H
54

source code of qt3d/src/render/renderstates/qdepthtest.h