QTextureMaterial Class

(Qt3DExtras::QTextureMaterial)

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

Header: #include <QTextureMaterial>
qmake: QT += 3dextras
Since: Qt 5.9
Inherits: Qt3DRender::QMaterial

Properties

Public Functions

QTextureMaterial(Qt3DCore::QNode *parent = nullptr)
~QTextureMaterial()
Qt3DRender::QAbstractTexture *texture() const
QVector2D textureOffset() const
QMatrix3x3 textureTransform() const

Public Slots

void setTexture(Qt3DRender::QAbstractTexture *texture)
void setTextureOffset(QVector2D textureOffset)
void setTextureTransform(const QMatrix3x3 &matrix)

Signals

void textureChanged(Qt3DRender::QAbstractTexture *texture)
void textureOffsetChanged(QVector2D textureOffset)
void textureTransformChanged(const QMatrix3x3 &textureTransform)

Additional Inherited Members

  • 11 static public members inherited from QObject
  • 2 protected functions inherited from Qt3DCore::QNode
  • 9 protected functions inherited from QObject

Detailed Description

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

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

texture : Qt3DRender::QAbstractTexture *

Holds the current texture used by the material.

Access functions:

Qt3DRender::QAbstractTexture *texture() const
void setTexture(Qt3DRender::QAbstractTexture *texture)

Notifier signal:

void textureChanged(Qt3DRender::QAbstractTexture *texture)

textureOffset : QVector2D

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

Access functions:

QVector2D textureOffset() const
void setTextureOffset(QVector2D textureOffset)

Notifier signal:

void textureOffsetChanged(QVector2D textureOffset)

textureTransform : QMatrix3x3

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

Access functions:

QMatrix3x3 textureTransform() const
void setTextureTransform(const QMatrix3x3 &matrix)

Notifier signal:

void textureTransformChanged(const QMatrix3x3 &textureTransform)

Member Function Documentation

QTextureMaterial::QTextureMaterial(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QTextureMaterial.

QTextureMaterial::~QTextureMaterial()

Destroys the QTextureMaterial instance.

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.