QAbstractTextureImage Class

(Qt3DRender::QAbstractTextureImage)

Encapsulates the necessary information to create an OpenGL texture image. More...

Header: #include <QAbstractTextureImage>
qmake: QT += 3drender
Since: Qt 5.5
Instantiated By: AbstractTextureImage
Inherits: Qt3DCore::QNode
Inherited By:

Qt3DRender::QTextureImage

Properties

Public Functions

QAbstractTextureImage(Qt3DCore::QNode *parent = Q_NULLPTR)
virtual ~QAbstractTextureImage()
QAbstractTextureProvider::CubeMapFace cubeMapFace() const
virtual QTextureDataFunctorPtr dataFunctor() const = 0
int layer() const
int mipmapLevel() const
void update()

Public Slots

void setCubeMapFace(QAbstractTextureProvider::CubeMapFace face)
void setLayer(int layer)
void setMipmapLevel(int level)

Signals

void cubeMapFaceChanged(QAbstractTextureProvider::CubeMapFace cubeMapFace)
void layerChanged(int layer)
void mipmapLevelChanged(int mipmapLevel)

Protected Functions

QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR)
void copy(const Qt3DCore::QNode *ref)

Additional Inherited Members

Detailed Description

Encapsulates the necessary information to create an OpenGL texture image.

QAbstractTextureImage should be used as the means of providing image data to a QAbstractTextureProvider. 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 QTextureDataFunctor 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.

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

Property Documentation

cubeMapFace : Qt3DRender::QAbstractTextureProvider::CubeMapFace

Holds the cube map face of the texture image.

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

Access functions:

QAbstractTextureProvider::CubeMapFace cubeMapFace() const
void setCubeMapFace(QAbstractTextureProvider::CubeMapFace face)

Notifier signal:

void cubeMapFaceChanged(QAbstractTextureProvider::CubeMapFace cubeMapFace)

layer : int

Holds the layer of the texture image.

Access functions:

int layer() const
void setLayer(int layer)

Notifier signal:

void layerChanged(int layer)

mipmapLevel : int

Holds the mipmap level of the texture image.

Access functions:

int mipmapLevel() const
void setMipmapLevel(int level)

Notifier signal:

void mipmapLevelChanged(int mipmapLevel)

Member Function Documentation

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

Default constructs an instance of QAbstractTextureImage.

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

Copy constructor.

[virtual] QAbstractTextureImage::~QAbstractTextureImage()

The destructor.

[protected] void QAbstractTextureImage::copy(const Qt3DCore::QNode *ref)

[pure virtual] QTextureDataFunctorPtr QAbstractTextureImage::dataFunctor() const

void QAbstractTextureImage::update()

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

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/archives/qt-5.6/qt3drender-qabstracttextureimage.html