QTextureLoader Class

(Qt3DRender::QTextureLoader)

属性

公有函数

QTextureLoader(Qt3DCore::QNode *parent = nullptr)
bool isMirrored() const
QUrl source() const

公有槽函数

void setMirrored(bool mirrored)
void setSource(const QUrl &source)

信号

void mirroredChanged(bool mirrored)
void sourceChanged(const QUrl &source)

其他继承的成员

属性

mirrored : bool

This property specifies whether the texture should be mirrored when loaded. This is a convenience to avoid having to manipulate images to match the origin of the texture coordinates used by the rendering API. By default this property is set to true. This has no effect when using compressed texture formats.

Note: OpenGL specifies the origin of texture coordinates from the lower left hand corner whereas DirectX uses the the upper left hand corner.

Note: When using cube map texture you'll probably want mirroring disabled as the cube map sampler takes a direction rather than regular texture coordinates.

访问函数:

bool isMirrored() const
void setMirrored(bool mirrored)

Notifier signal:

void mirroredChanged(bool mirrored)

source : QUrl

访问函数:

QUrl source() const
void setSource(const QUrl &source)

Notifier signal:

void sourceChanged(const QUrl &source)

成员函数

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

Default constructs an instance of QTextureLoader.

[slot] void QTextureLoader::setMirrored(bool mirrored)

Sets mirroring to mirrored.

Note: This internally triggers a call to update the data generator.

Note: Setter function for property mirrored.

参见 isMirrored().

[slot] void QTextureLoader::setSource(const QUrl &source)

Sets the texture loader source to source. source

Note: Setter function for property source.

参见 source().

QUrl QTextureLoader::source() const

Returns the current texture source.

Note: Getter function for property source.

参见 setSource().