QTextureMaterial Class
class Qt3DExtras::QTextureMaterialThe QTextureMaterial provides a default implementation of a simple unlit texture material. \inmodule Qt3DExtras \since 5.9 \inherits Qt3DRender::QMaterial. More...
| Header: | #include <QTextureMaterial> |
| Inherits: | Qt3DRender::QMaterial |
Properties
- alphaBlending : bool
- texture : Qt3DRender::QAbstractTexture*
- textureOffset : QVector2D
- textureTransform : QMatrix3x3
Public Functions
| virtual | ~QTextureMaterial() |
| bool | isAlphaBlendingEnabled() const |
| Qt3DRender::QAbstractTexture * | texture() const |
| QVector2D | textureOffset() const |
| QMatrix3x3 | textureTransform() const |
Public Slots
| void | setAlphaBlendingEnabled(bool enabled) |
| void | setTexture(Qt3DRender::QAbstractTexture *texture) |
| void | setTextureOffset(QVector2D textureOffset) |
| void | setTextureTransform(const QMatrix3x3 &matrix) |
Signals
| void | alphaBlendingEnabledChanged(bool enabled) |
| void | textureChanged(Qt3DRender::QAbstractTexture *texture) |
| void | textureOffsetChanged(QVector2D textureOffset) |
| void | textureTransformChanged(const QMatrix3x3 &textureTransform) |
Detailed Description
\ingroupqt3d-extras-materials
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:
| 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
[virtual noexcept] QTextureMaterial::~QTextureMaterial()
Destroys the QTextureMaterial instance.