QAbstractTexture Class
class Qt3DRender::QAbstractTextureA base class to be used to provide textures. More...
Header: | #include <QAbstractTexture> |
qmake: | QT += 3drender |
Since: | Qt 5.5 |
Instantiated By: | AbstractTexture |
Inherits: | Qt3DCore::QNode |
Inherited By: | Qt3DRender::QSharedGLTexture, Qt3DRender::QTexture1D, Qt3DRender::QTexture1DArray, Qt3DRender::QTexture2D, Qt3DRender::QTexture2DArray, Qt3DRender::QTexture2DMultisample, Qt3DRender::QTexture2DMultisampleArray, Qt3DRender::QTexture3D, Qt3DRender::QTextureBuffer, Qt3DRender::QTextureCubeMap, Qt3DRender::QTextureCubeMapArray, Qt3DRender::QTextureLoader, and Qt3DRender::QTextureRectangle |
This class was introduced in Qt 5.5.
Public Types
enum | Status { None, Loading, Ready, Error } |
Detailed Description
The QAbstractTexture class shouldn't be used directly but rather through one of its subclasses. Each subclass implements a given texture target (2D, 2DArray, 3D, CubeMap ...) Each subclass provides a set of functors for each layer, cube map face and mipmap level. In turn the backend uses those functor to properly fill a corresponding OpenGL texture with data. It is expected the functor does as minimal processing as possible so as not to slow down textures generation and upload. If the content of a texture is the result of a slow procedural generation process, it is recommended not to implement this directly in a functor.
All textures are unique. If you instantiate twice the same texture this will create 2 identical textures on the GPU, no sharing will take place.