QAbstractTextureImage Class

( Qt3DRender::QAbstractTextureImage )

Encapsulates the necessary information to create an OpenGL texture image. 更多...

头: #include <QAbstractTextureImage>
qmake: QT += 3drender
Since: Qt 5.5
实例化: AbstractTextureImage
继承: Qt3DCore::QNode
继承者: Qt3DRender::QPaintedTextureImage and Qt3DRender::QTextureImage

特性

公共函数

QAbstractTextureImage (Qt3DCore::QNode * parent = nullptr)
QAbstractTexture::CubeMapFace face () const
int layer () const
int mipLevel () const

公共槽

void setFace (QAbstractTexture::CubeMapFace face )
void setLayer (int layer )
void setMipLevel (int level )

信号

void faceChanged (QAbstractTexture::CubeMapFace face )
void layerChanged (int layer )
void mipLevelChanged (int mipLevel )

保护函数

QAbstractTextureImage (QAbstractTextureImagePrivate & dd , Qt3DCore::QNode * parent = nullptr)
virtual QTextureImageDataGeneratorPtr dataGenerator () const = 0
void notifyDataGeneratorChanged ()

额外继承成员

详细描述

Encapsulates the necessary information to create an OpenGL texture image.

QAbstractTextureImage should be used as the means of providing image data to a QAbstractTexture . It contains the necessary information: mipmap level, layer, cube face load at the proper place data into an OpenGL texture.

The actual data is provided through a QTextureImageDataGenerator that will be executed by Aspect jobs in the backend. QAbstractTextureImage should be subclassed to provide a functor and eventual additional properties needed by the functor to load actual data.

注意: : QAbstractTextureImage should never be shared. Expect crashes, undefined behavior at best if this rule is not respected.

特性文档编制

face : Qt3DRender::QAbstractTexture::CubeMapFace

Holds the cube map face of the texture image.

注意: The cube map face has a meaning only for TargetCubeMap and TargetCubeMapArray .

访问函数:

QAbstractTexture::CubeMapFace face () const
void setFace (QAbstractTexture::CubeMapFace face )

通知程序信号:

void faceChanged (QAbstractTexture::CubeMapFace face )

layer : int

Returns the layer of the texture image.

访问函数:

int layer () const
void setLayer (int layer )

通知程序信号:

void layerChanged (int layer )

mipLevel : int

Holds the mipmap level of the texture image.

访问函数:

int mipLevel () const
void setMipLevel (int level )

通知程序信号:

void mipLevelChanged (int mipLevel )

成员函数文档编制

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

Default constructs an instance of QAbstractTextureImage.

[protected] QAbstractTextureImage:: QAbstractTextureImage ( QAbstractTextureImagePrivate & dd , Qt3DCore::QNode * parent = nullptr)

Copy constructor.

[pure virtual protected] QTextureImageDataGeneratorPtr QAbstractTextureImage:: dataGenerator () const

Implement this method to return the QTextureImageDataGeneratorPtr , which will provide the data for the texture image.

[protected] void QAbstractTextureImage:: notifyDataGeneratorChanged ()

Triggers an update of the data generator that is sent to the backend.

[slot] void QAbstractTextureImage:: setFace ( QAbstractTexture::CubeMapFace face )

Sets the texture image face to face . face

注意: Setter 函数对于特性 face .

另请参阅 face ().

[slot] void QAbstractTextureImage:: setLayer ( int layer )

Sets the layer of a texture to layer . layer

注意: Setter 函数对于特性 layer .

另请参阅 layer ().

[slot] void QAbstractTextureImage:: setMipLevel ( int level )

Sets the mip level of a texture to level . level

注意: Setter 函数对于特性 mipLevel .

另请参阅 mipLevel ().