IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QDepthTest Class

The QDepthTest class tests the fragment shader's depth value against the depth of a sample being written to.

This class was introduced in Qt 5.7.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QDepthTest Class

  • Header: QDepthTest

  • Since: Qt 5.7

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3drender)

    target_link_libraries(mytarget PRIVATE Qt6::3drender)

  • qmake: QT += 3drender

  • Inherited By:

  • Instantiated By: qml-qt3d-render-depthtest.xml

  • Inherits: Qt3DRender::QRenderState

  • Group: QDepthTest is part of renderstates

Detailed Description

A QDepthTest class is used to enable depth testing with a given depth test function. The depth test enables writing fragment color values when the depth test passes, and reject fragments which fail the test. The depth test uses the depth function to test the fragments depth value to the value against z-buffer. If the underlying surface does not have z-buffer, then QDepthTest does nothing.

See Also

Member Type Documentation

 

enum QDepthTest::DepthFunction

Enumeration for the depth function values

Constant

Value

Description

Qt3DRender::QDepthTest::Never

0x0200

Never pass depth test

Qt3DRender::QDepthTest::Always

0x0207

Always pass depth test

Qt3DRender::QDepthTest::Less

0x0201

Pass depth test if fragment depth is less than z-buffer value

Qt3DRender::QDepthTest::LessOrEqual

0x0203

Pass depth test if fragment depth is less than or equal to z-buffer value

Qt3DRender::QDepthTest::Equal

0x0202

Pass depth test if fragment depth is equal to z-buffer value

Qt3DRender::QDepthTest::GreaterOrEqual

0x0206

Pass depth test if fragment depth is greater than or equal to z-buffer value

Qt3DRender::QDepthTest::Greater

0x0204

Pass depth test if fragment depth is greater than z-buffer value

Qt3DRender::QDepthTest::NotEqual

0x0205

Pass depth test if fragment depth is not equal to z-buffer value

Property Documentation

 

depthFunction : DepthFunction

Holds the current function used by depth test. The default is Never.

Access functions:

  • depthFunction() const

  • void setDepthFunction( depthFunction)

Notifier signal:

  • void depthFunctionChanged( depthFunction)

Member Function Documentation

 

[explicit] QDepthTest::QDepthTest(Qt3DCore::QNode *parent = nullptr)

The constructor creates a new QDepthTest::QDepthTest instance with the specified parent.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+