The QTextureMaterial provides a default implementation of a simple unlit texture material. More...
Header: | #include <QTextureMaterial> |
CMake: | find_package(Qt6 COMPONENTS 3dextras REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
qmake: | QT += 3dextras |
Since: | Qt 5.9 |
Inherits: | Qt3DRender::QMaterial |
QTextureMaterial(Qt3DCore::QNode *parent = nullptr) | |
virtual | ~QTextureMaterial() |
bool | isAlphaBlendingEnabled() const |
Qt3DRender::QAbstractTexture * | texture() const |
QVector2D | textureOffset() const |
QMatrix3x3 | textureTransform() const |
void | setAlphaBlendingEnabled(bool enabled) |
void | setTexture(Qt3DRender::QAbstractTexture *texture) |
void | setTextureOffset(QVector2D textureOffset) |
void | setTextureTransform(const QMatrix3x3 &matrix) |
void | alphaBlendingEnabledChanged(bool enabled) |
void | textureChanged(Qt3DRender::QAbstractTexture *texture) |
void | textureOffsetChanged(QVector2D textureOffset) |
void | textureTransformChanged(const QMatrix3x3 &textureTransform) |
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.
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) |
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) |
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) |
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) |
Constructs a new QTextureMaterial instance with parent object parent.
[virtual]
QTextureMaterial::~QTextureMaterial()
Destroys the QTextureMaterial instance.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qt3dextras-qtexturematerial.html