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: |
Properties
- 2 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
QAbstractTextureImage(Qt3DCore::QNode *parent = nullptr) | |
QAbstractTexture::CubeMapFace | face() const |
int | layer() const |
int | mipLevel() const |
- 6 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject
Public Slots
void | setFace(QAbstractTexture::CubeMapFace face) |
void | setLayer(int layer) |
void | setMipLevel(int level) |
- 2 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
void | faceChanged(QAbstractTexture::CubeMapFace face) |
void | layerChanged(int layer) |
void | mipLevelChanged(int mipLevel) |
- 3 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Protected Functions
QAbstractTextureImage(QAbstractTextureImagePrivate &dd, Qt3DCore::QNode *parent = nullptr) | |
virtual QTextureImageDataGeneratorPtr | dataGenerator() const = 0 |
void | notifyDataGeneratorChanged() |
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
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 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.
Property Documentation
face : Qt3DRender::QAbstractTexture::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:
QAbstractTexture::CubeMapFace | face() const |
void | setFace(QAbstractTexture::CubeMapFace face) |
Notifier signal:
void | faceChanged(QAbstractTexture::CubeMapFace face) |
layer : int
Returns the layer of the texture image.
Access functions:
int | layer() const |
void | setLayer(int layer) |
Notifier signal:
void | layerChanged(int layer) |
mipLevel : int
Holds the mipmap level of the texture image.
Access functions:
int | mipLevel() const |
void | setMipLevel(int level) |
Notifier signal:
void | mipLevelChanged(int mipLevel) |
Member Function Documentation
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
Note: Setter function for property face.
See also face().
[slot]
void QAbstractTextureImage::setLayer(int layer)
Sets the layer of a texture to layer. layer
Note: Setter function for property layer.
See also layer().
[slot]
void QAbstractTextureImage::setMipLevel(int level)
Sets the mip level of a texture to level. level
Note: Setter function for property mipLevel.
See also mipLevel().