QAbstractTextureImage Class

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::QPaintedTextureImage and Qt3DRender::QTextureImage

This class was introduced in Qt 5.5.

Public Functions

QAbstractTextureImage(Qt3DCore::QNode *parent = nullptr)
void setLayer(int layer)
void setMipLevel(int level)

Protected Functions

virtual Qt3DRender::QTextureImageDataGeneratorPtr dataGenerator() const = 0

Detailed Description

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.

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

Member Function Documentation

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

Constructs a new QAbstractTextureImage instance with parent as parent.

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

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

void QAbstractTextureImage::setLayer(int layer)

Sets the layer of a texture to layer. layer

void QAbstractTextureImage::setMipLevel(int level)

Sets the mip level of a texture to level. level