QTextureMaterial Class

( Qt3DExtras::QTextureMaterial )

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

头: #include <QTextureMaterial>
qmake: QT += 3dextras
Since: Qt 5.9
继承: Qt3DRender::QMaterial

特性

公共函数

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

公共槽

void setTexture (Qt3DRender::QAbstractTexture * texture )
void setTextureOffset (QVector2D textureOffset )

信号

void textureChanged (Qt3DRender::QAbstractTexture * texture )
void textureOffsetChanged (QVector2D textureOffset )

额外继承成员

详细描述

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.

特性文档编制

texture : Qt3DRender::QAbstractTexture *

Holds the current texture used by the material.

访问函数:

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

通知程序信号:

void textureChanged (Qt3DRender::QAbstractTexture * texture )

textureOffset : QVector2D

Holds the current texture offset. It is applied to texture coordinates at render time. Defaults to (0.0, 0.0).

访问函数:

QVector2D textureOffset () const
void setTextureOffset (QVector2D textureOffset )

通知程序信号:

void textureOffsetChanged (QVector2D textureOffset )

成员函数文档编制

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

Default constructs an instance of QTextureMaterial.

QTextureMaterial:: ~QTextureMaterial ()

销毁 QTextureMaterial 实例。