summaryrefslogtreecommitdiff
path: root/src/render/renderstates/qnodepthmask.cpp
blob: 786d762b3079659590968700ed3b902ff212bfcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
// Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qnodepthmask.h"
#include "qrenderstate_p.h"
#include <private/qnode_p.h>

QT_BEGIN_NAMESPACE

namespace Qt3DRender {

/*!
    \class Qt3DRender::QNoDepthMask
    \brief Disable depth write.
    \since 5.7
    \ingroup renderstates
    \inmodule Qt3DRender

    A Qt3DRender::QNoDepthMask class disables fragment depth write to depth buffer.

    \sa Qt3DRender::QDepthTest
 */

/*!
    \qmltype NoDepthMask
    \brief Disable depth write.
    \since 5.7
    \ingroup renderstates
    \inqmlmodule Qt3D.Render
    \inherits RenderState
    \instantiates Qt3DRender::QNoDepthMask

    A NoDepthMask type disables fragment depth write to depth buffer.

    \sa Qt3DRender::QDepthTest
 */

class QNoDepthMaskPrivate : public QRenderStatePrivate
{
public:
    QNoDepthMaskPrivate()
        : QRenderStatePrivate(Render::DepthWriteStateMask)
    {
    }

    Q_DECLARE_PUBLIC(QNoDepthMask)
};

/*!
    The constructor creates a new QNoDepthMask::QNoDepthMask instance with
    the specified \a parent.
 */
QNoDepthMask::QNoDepthMask(QNode *parent)
    : QRenderState(*new QNoDepthMaskPrivate, parent)
{
}

/*! \internal */
QNoDepthMask::~QNoDepthMask()
{
}

} // namespace Qt3DRender

QT_END_NAMESPACE