| 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 | #include "qnodepthmask.h" | 
| 6 | #include "qrenderstate_p.h" | 
| 7 | #include <private/qnode_p.h> | 
| 8 |  | 
| 9 | QT_BEGIN_NAMESPACE | 
| 10 |  | 
| 11 | namespace Qt3DRender { | 
| 12 |  | 
| 13 | /*! | 
| 14 |     \class Qt3DRender::QNoDepthMask | 
| 15 |     \brief Disable depth write. | 
| 16 |     \since 5.7 | 
| 17 |     \ingroup renderstates | 
| 18 |     \inmodule Qt3DRender | 
| 19 |  | 
| 20 |     A Qt3DRender::QNoDepthMask class disables fragment depth write to depth buffer. | 
| 21 |  | 
| 22 |     \sa Qt3DRender::QDepthTest | 
| 23 |  */ | 
| 24 |  | 
| 25 | /*! | 
| 26 |     \qmltype NoDepthMask | 
| 27 |     \brief Disable depth write. | 
| 28 |     \since 5.7 | 
| 29 |     \ingroup renderstates | 
| 30 |     \inqmlmodule Qt3D.Render | 
| 31 |     \inherits RenderState | 
| 32 |     \nativetype Qt3DRender::QNoDepthMask | 
| 33 |  | 
| 34 |     A NoDepthMask type disables fragment depth write to depth buffer. | 
| 35 |  | 
| 36 |     \sa Qt3DRender::QDepthTest | 
| 37 |  */ | 
| 38 |  | 
| 39 | class QNoDepthMaskPrivate : public QRenderStatePrivate | 
| 40 | { | 
| 41 | public: | 
| 42 |     QNoDepthMaskPrivate() | 
| 43 |         : QRenderStatePrivate(Render::DepthWriteStateMask) | 
| 44 |     { | 
| 45 |     } | 
| 46 |  | 
| 47 |     Q_DECLARE_PUBLIC(QNoDepthMask) | 
| 48 | }; | 
| 49 |  | 
| 50 | /*! | 
| 51 |     The constructor creates a new QNoDepthMask::QNoDepthMask instance with | 
| 52 |     the specified \a parent. | 
| 53 |  */ | 
| 54 | QNoDepthMask::QNoDepthMask(QNode *parent) | 
| 55 |     : QRenderState(*new QNoDepthMaskPrivate, parent) | 
| 56 | { | 
| 57 | } | 
| 58 |  | 
| 59 | /*! \internal */ | 
| 60 | QNoDepthMask::~QNoDepthMask() | 
| 61 | { | 
| 62 | } | 
| 63 |  | 
| 64 | } // namespace Qt3DRender | 
| 65 |  | 
| 66 | QT_END_NAMESPACE | 
| 67 |  | 
| 68 | #include "moc_qnodepthmask.cpp" | 
| 69 |  |