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

QTextureMaterial Class

The QTextureMaterial provides a default implementation of a simple unlit texture material.

This class was introduced in Qt 5.9.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QTextureMaterial Class

  • Header: QTextureMaterial

  • Since: Qt 5.9

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3dextras)

    target_link_libraries(mytarget PRIVATE Qt6::3dextras)

  • qmake: QT += 3dextras

  • Inherits: Qt3DRender::QMaterial

  • Group: QTextureMaterial is part of qt3d-extras-materials

Detailed Description

This material uses an effect with a single render pass approach. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.

Property Documentation

 

alphaBlending : bool

Indicates if the alpha information coming from the diffuse property will be taken into account during rendering. Defaults to false.

Access functions:

  • bool isAlphaBlendingEnabled() const

  • void setAlphaBlendingEnabled(bool enabled)

Notifier signal:

  • void alphaBlendingEnabledChanged(bool enabled)

texture : Qt3DRender::QAbstractTexture*

Holds the current texture used by the material.

Access functions:

  • *texture() const

  • void setTexture( *texture)

Notifier signal:

  • void textureChanged( *texture)

textureOffset : QVector2D

This is a utility property. It sets the translation component of the general texture transform matrix

Access functions:

  • textureOffset() const

  • void setTextureOffset( textureOffset)

Notifier signal:

  • void textureOffsetChanged( textureOffset)

textureTransform : QMatrix3x3

Holds the current texture transform. It is applied to texture coordinates at render time. Defaults to identity matrix.

Access functions:

  • textureTransform() const

  • void setTextureTransform(const &matrix)

Notifier signal:

  • void textureTransformChanged(const &textureTransform)

Member Function Documentation

 

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

Constructs a new QTextureMaterial instance with parent object parent.

[virtual] QTextureMaterial::~QTextureMaterial()

Destroys the QTextureMaterial instance.

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