QAbstractTexture Class
class Qt3DRender::QAbstractTextureA base class to be used to provide textures. More...
Header: | #include <QAbstractTexture> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
Instantiated By: | AbstractTexture |
Inherits: | Qt3DCore::QNode |
Inherited By: | 13 typesQt3DRender::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 |
Public Types
enum | CubeMapFace { CubeMapPositiveX, CubeMapNegativeX, CubeMapPositiveY, CubeMapNegativeY, CubeMapPositiveZ, …, AllFaces } |
enum | Filter { Nearest, Linear, NearestMipMapNearest, NearestMipMapLinear, LinearMipMapNearest, LinearMipMapLinear } |
enum | Status { None, Loading, Ready, Error } |
enum | Target { TargetAutomatic, Target1D, Target1DArray, Target2D, Target2DArray, …, TargetBuffer } |
enum | TextureFormat { NoFormat, Automatic, R8_UNorm, RG8_UNorm, RGB8_UNorm, …, LuminanceAlphaFormat } |
Properties
|
|
Public Functions
void | addTextureImage(Qt3DRender::QAbstractTextureImage *textureImage) |
Qt3DRender::QAbstractTexture::ComparisonFunction | comparisonFunction() const |
Qt3DRender::QAbstractTexture::ComparisonMode | comparisonMode() const |
int | depth() const |
Qt3DRender::QAbstractTexture::TextureFormat | format() const |
bool | generateMipMaps() const |
QVariant | handle() const |
Qt3DRender::QAbstractTexture::HandleType | handleType() const |
int | height() const |
int | layers() const |
Qt3DRender::QAbstractTexture::Filter | magnificationFilter() const |
float | maximumAnisotropy() const |
Qt3DRender::QAbstractTexture::Filter | minificationFilter() const |
int | mipLevels() const |
void | removeTextureImage(Qt3DRender::QAbstractTextureImage *textureImage) |
int | samples() const |
void | setSize(int w, int h = 1, int d = 1) |
void | setWrapMode(const Qt3DRender::QTextureWrapMode &wrapMode) |
Qt3DRender::QAbstractTexture::Status | status() const |
Qt3DRender::QAbstractTexture::Target | target() const |
QList<Qt3DRender::QAbstractTextureImage *> | textureImages() const |
void | updateData(const Qt3DRender::QTextureDataUpdate &update) |
int | width() const |
Qt3DRender::QTextureWrapMode * | wrapMode() |
Public Slots
void | setComparisonFunction(Qt3DRender::QAbstractTexture::ComparisonFunction function) |
void | setComparisonMode(Qt3DRender::QAbstractTexture::ComparisonMode mode) |
void | setDepth(int depth) |
void | setFormat(Qt3DRender::QAbstractTexture::TextureFormat format) |
void | setGenerateMipMaps(bool gen) |
void | setHeight(int height) |
void | setLayers(int layers) |
void | setMagnificationFilter(Qt3DRender::QAbstractTexture::Filter f) |
void | setMaximumAnisotropy(float anisotropy) |
void | setMinificationFilter(Qt3DRender::QAbstractTexture::Filter f) |
void | setMipLevels(int mipLevels) |
void | setSamples(int samples) |
void | setWidth(int width) |
Signals
void | comparisonFunctionChanged(Qt3DRender::QAbstractTexture::ComparisonFunction comparisonFunction) |
void | comparisonModeChanged(Qt3DRender::QAbstractTexture::ComparisonMode comparisonMode) |
void | depthChanged(int depth) |
void | formatChanged(Qt3DRender::QAbstractTexture::TextureFormat format) |
void | generateMipMapsChanged(bool generateMipMaps) |
void | handleChanged(QVariant handle) |
void | handleTypeChanged(Qt3DRender::QAbstractTexture::HandleType handleType) |
void | heightChanged(int height) |
void | layersChanged(int layers) |
void | magnificationFilterChanged(Qt3DRender::QAbstractTexture::Filter magnificationFilter) |
void | maximumAnisotropyChanged(float maximumAnisotropy) |
void | minificationFilterChanged(Qt3DRender::QAbstractTexture::Filter minificationFilter) |
void | mipLevelsChanged(int mipLevels) |
void | samplesChanged(int samples) |
void | statusChanged(Qt3DRender::QAbstractTexture::Status status) |
void | widthChanged(int width) |
Protected Functions
QAbstractTexture(Qt3DCore::QNode *parent = nullptr) | |
QAbstractTexture(Qt3DRender::QAbstractTexture::Target target, Qt3DCore::QNode *parent = nullptr) | |
void | setStatus(Qt3DRender::QAbstractTexture::Status status) |
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.
Member Type Documentation
enum QAbstractTexture::CubeMapFace
This enum identifies the faces of a cube map texture
Constant | Value | Description |
---|---|---|
Qt3DRender::QAbstractTexture::CubeMapPositiveX | 0x8515 | Specify the positive X face of a cube map |
Qt3DRender::QAbstractTexture::CubeMapNegativeX | 0x8516 | Specify the negative X face of a cube map |
Qt3DRender::QAbstractTexture::CubeMapPositiveY | 0x8517 | Specify the positive Y face of a cube map |
Qt3DRender::QAbstractTexture::CubeMapNegativeY | 0x8518 | Specify the negative Y face of a cube map |
Qt3DRender::QAbstractTexture::CubeMapPositiveZ | 0x8519 | Specify the positive Z face of a cube map |
Qt3DRender::QAbstractTexture::CubeMapNegativeZ | 0x851A | Specify the negative Z face of a cube map |
Qt3DRender::QAbstractTexture::AllFaces | 0x851b | Specify all the faces of a cube map |
Note: AllFaces should only be used when a behavior needs to be applied to all the faces of a cubemap. This is the case for example when using a cube map as a texture attachment. Using AllFaces in the attachment specfication would result in all faces being bound to the attachment point. On the other hand, if a specific face is specified, the attachment would only be using the specified face.
enum QAbstractTexture::Filter
Holds the filter type of the texture provider.
Constant | Value | Description |
---|---|---|
Qt3DRender::QAbstractTexture::Nearest | 0x2600 | GL_NEAREST |
Qt3DRender::QAbstractTexture::Linear | 0x2601 | GL_LINEAR |
Qt3DRender::QAbstractTexture::NearestMipMapNearest | 0x2700 | GL_NEAREST_MIPMAP_NEAREST |
Qt3DRender::QAbstractTexture::NearestMipMapLinear | 0x2702 | GL_NEAREST_MIPMAP_LINEAR |
Qt3DRender::QAbstractTexture::LinearMipMapNearest | 0x2701 | GL_LINEAR_MIPMAP_NEAREST |
Qt3DRender::QAbstractTexture::LinearMipMapLinear | 0x2703 | GL_LINEAR_MIPMAP_LINEAR |
enum QAbstractTexture::Status
Contains the status of the texture provider.
Constant | Value |
---|---|
Qt3DRender::QAbstractTexture::None | 0 |
Qt3DRender::QAbstractTexture::Loading | 1 |
Qt3DRender::QAbstractTexture::Ready | 2 |
Qt3DRender::QAbstractTexture::Error | 3 |
enum QAbstractTexture::Target
Constant | Value | Description |
---|---|---|
Qt3DRender::QAbstractTexture::TargetAutomatic | 0 | Target will be determined by the Qt3D engine |
Qt3DRender::QAbstractTexture::Target1D | 0x0DE0 | GL_TEXTURE_1D |
Qt3DRender::QAbstractTexture::Target1DArray | 0x8C18 | GL_TEXTURE_1D_ARRAY |
Qt3DRender::QAbstractTexture::Target2D | 0x0DE1 | GL_TEXTURE_2D |
Qt3DRender::QAbstractTexture::Target2DArray | 0x8C1A | GL_TEXTURE_2D_ARRAY |
Qt3DRender::QAbstractTexture::Target3D | 0x806F | GL_TEXTURE_3D |
Qt3DRender::QAbstractTexture::TargetCubeMap | 0x8513 | GL_TEXTURE_CUBE_MAP |
Qt3DRender::QAbstractTexture::TargetCubeMapArray | 0x9009 | GL_TEXTURE_CUBE_MAP_ARRAY |
Qt3DRender::QAbstractTexture::Target2DMultisample | 0x9100 | GL_TEXTURE_2D_MULTISAMPLE |
Qt3DRender::QAbstractTexture::Target2DMultisampleArray | 0x9102 | GL_TEXTURE_2D_MULTISAMPLE_ARRAY |
Qt3DRender::QAbstractTexture::TargetRectangle | 0x84F5 | GL_TEXTURE_RECTANGLE |
Qt3DRender::QAbstractTexture::TargetBuffer | 0x8C2A | GL_TEXTURE_BUFFER |
enum QAbstractTexture::TextureFormat
This list describes all possible texture formats
Constant | Value | Description |
---|---|---|
Qt3DRender::QAbstractTexture::NoFormat | 0 | GL_NONE |
Qt3DRender::QAbstractTexture::Automatic | 1 | automatically_determines_format |
Qt3DRender::QAbstractTexture::R8_UNorm | 0x8229 | GL_R8 |
Qt3DRender::QAbstractTexture::RG8_UNorm | 0x822B | GL_RG8 |
Qt3DRender::QAbstractTexture::RGB8_UNorm | 0x8051 | GL_RGB8 |
Qt3DRender::QAbstractTexture::RGBA8_UNorm | 0x8058 | GL_RGBA8 |
Qt3DRender::QAbstractTexture::R16_UNorm | 0x822A | GL_R16 |
Qt3DRender::QAbstractTexture::RG16_UNorm | 0x822C | GL_RG16 |
Qt3DRender::QAbstractTexture::RGB16_UNorm | 0x8054 | GL_RGB16 |
Qt3DRender::QAbstractTexture::RGBA16_UNorm | 0x805B | GL_RGBA16 |
Qt3DRender::QAbstractTexture::R8_SNorm | 0x8F94 | GL_R8_SNORM |
Qt3DRender::QAbstractTexture::RG8_SNorm | 0x8F95 | GL_RG8_SNORM |
Qt3DRender::QAbstractTexture::RGB8_SNorm | 0x8F96 | GL_RGB8_SNORM |
Qt3DRender::QAbstractTexture::RGBA8_SNorm | 0x8F97 | GL_RGBA8_SNORM |
Qt3DRender::QAbstractTexture::R16_SNorm | 0x8F98 | GL_R16_SNORM |
Qt3DRender::QAbstractTexture::RG16_SNorm | 0x8F99 | GL_RG16_SNORM |
Qt3DRender::QAbstractTexture::RGB16_SNorm | 0x8F9A | GL_RGB16_SNORM |
Qt3DRender::QAbstractTexture::RGBA16_SNorm | 0x8F9B | GL_RGBA16_SNORM |
Qt3DRender::QAbstractTexture::R8U | 0x8232 | GL_R8UI |
Qt3DRender::QAbstractTexture::RG8U | 0x8238 | GL_RG8UI |
Qt3DRender::QAbstractTexture::RGB8U | 0x8D7D | GL_RGB8UI |
Qt3DRender::QAbstractTexture::RGBA8U | 0x8D7C | GL_RGBA8UI |
Qt3DRender::QAbstractTexture::R16U | 0x8234 | GL_R16UI |
Qt3DRender::QAbstractTexture::RG16U | 0x823A | GL_RG16UI |
Qt3DRender::QAbstractTexture::RGB16U | 0x8D77 | GL_RGB16UI |
Qt3DRender::QAbstractTexture::RGBA16U | 0x8D76 | GL_RGBA16UI |
Qt3DRender::QAbstractTexture::R32U | 0x8236 | GL_R32UI |
Qt3DRender::QAbstractTexture::RG32U | 0x823C | GL_RG32UI |
Qt3DRender::QAbstractTexture::RGB32U | 0x8D71 | GL_RGB32UI |
Qt3DRender::QAbstractTexture::RGBA32U | 0x8D70 | GL_RGBA32UI |
Qt3DRender::QAbstractTexture::R8I | 0x8231 | GL_R8I |
Qt3DRender::QAbstractTexture::RG8I | 0x8237 | GL_RG8I |
Qt3DRender::QAbstractTexture::RGB8I | 0x8D8F | GL_RGB8I |
Qt3DRender::QAbstractTexture::RGBA8I | 0x8D8E | GL_RGBA8I |
Qt3DRender::QAbstractTexture::R16I | 0x8233 | GL_R16I |
Qt3DRender::QAbstractTexture::RG16I | 0x8239 | GL_RG16I |
Qt3DRender::QAbstractTexture::RGB16I | 0x8D89 | GL_RGB16I |
Qt3DRender::QAbstractTexture::RGBA16I | 0x8D88 | GL_RGBA16I |
Qt3DRender::QAbstractTexture::R32I | 0x8235 | GL_R32I |
Qt3DRender::QAbstractTexture::RG32I | 0x823B | GL_RG32I |
Qt3DRender::QAbstractTexture::RGB32I | 0x8D83 | GL_RGB32I |
Qt3DRender::QAbstractTexture::RGBA32I | 0x8D82 | GL_RGBA32I |
Qt3DRender::QAbstractTexture::R16F | 0x822D | GL_R16F |
Qt3DRender::QAbstractTexture::RG16F | 0x822F | GL_RG16F |
Qt3DRender::QAbstractTexture::RGB16F | 0x881B | GL_RGB16F |
Qt3DRender::QAbstractTexture::RGBA16F | 0x881A | GL_RGBA16F |
Qt3DRender::QAbstractTexture::R32F | 0x822E | GL_R32F |
Qt3DRender::QAbstractTexture::RG32F | 0x8230 | GL_RG32F |
Qt3DRender::QAbstractTexture::RGB32F | 0x8815 | GL_RGB32F |
Qt3DRender::QAbstractTexture::RGBA32F | 0x8814 | GL_RGBA32F |
Qt3DRender::QAbstractTexture::RGB9E5 | 0x8C3D | GL_RGB9_E5 |
Qt3DRender::QAbstractTexture::RG11B10F | 0x8C3A | GL_R11F_G11F_B10F |
Qt3DRender::QAbstractTexture::RG3B2 | 0x2A10 | GL_R3_G3_B2 |
Qt3DRender::QAbstractTexture::R5G6B5 | 0x8D62 | GL_RGB565 |
Qt3DRender::QAbstractTexture::RGB5A1 | 0x8057 | GL_RGB5_A1 |
Qt3DRender::QAbstractTexture::RGBA4 | 0x8056 | GL_RGBA4 |
Qt3DRender::QAbstractTexture::RGB10A2 | 0x8059 | GL_RGB10_A2 |
Qt3DRender::QAbstractTexture::RGB10A2U | 0x906F | GL_RGB10_A2UI |
Qt3DRender::QAbstractTexture::D16 | 0x81A5 | GL_DEPTH_COMPONENT16 |
Qt3DRender::QAbstractTexture::D24 | 0x81A6 | GL_DEPTH_COMPONENT24 |
Qt3DRender::QAbstractTexture::D24S8 | 0x88F0 | GL_DEPTH24_STENCIL8 |
Qt3DRender::QAbstractTexture::D32 | 0x81A7 | GL_DEPTH_COMPONENT32 |
Qt3DRender::QAbstractTexture::D32F | 0x8CAC | GL_DEPTH_COMPONENT32F |
Qt3DRender::QAbstractTexture::D32FS8X24 | 0x8CAD | GL_DEPTH32F_STENCIL8 |
Qt3DRender::QAbstractTexture::RGB_DXT1 | 0x83F0 | GL_COMPRESSED_RGB_S3TC_DXT1_EXT |
Qt3DRender::QAbstractTexture::RGBA_DXT1 | 0x83F1 | GL_COMPRESSED_RGBA_S3TC_DXT1_EXT |
Qt3DRender::QAbstractTexture::RGBA_DXT3 | 0x83F2 | GL_COMPRESSED_RGBA_S3TC_DXT3_EXT |
Qt3DRender::QAbstractTexture::RGBA_DXT5 | 0x83F3 | GL_COMPRESSED_RGBA_S3TC_DXT5_EXT |
Qt3DRender::QAbstractTexture::R_ATI1N_UNorm | 0x8DBB | GL_COMPRESSED_RED_RGTC1 |
Qt3DRender::QAbstractTexture::R_ATI1N_SNorm | 0x8DBC | GL_COMPRESSED_SIGNED_RED_RGTC1 |
Qt3DRender::QAbstractTexture::RG_ATI2N_UNorm | 0x8DBD | GL_COMPRESSED_RG_RGTC2 |
Qt3DRender::QAbstractTexture::RG_ATI2N_SNorm | 0x8DBE | GL_COMPRESSED_SIGNED_RG_RGTC2 |
Qt3DRender::QAbstractTexture::RGB_BP_UNSIGNED_FLOAT | 0x8E8F | GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB |
Qt3DRender::QAbstractTexture::RGB_BP_SIGNED_FLOAT | 0x8E8E | GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB |
Qt3DRender::QAbstractTexture::RGB_BP_UNorm | 0x8E8C | GL_COMPRESSED_RGBA_BPTC_UNORM_ARB |
Qt3DRender::QAbstractTexture::R11_EAC_UNorm | 0x9270 | GL_COMPRESSED_R11_EAC |
Qt3DRender::QAbstractTexture::R11_EAC_SNorm | 0x9271 | GL_COMPRESSED_SIGNED_R11_EAC |
Qt3DRender::QAbstractTexture::RG11_EAC_UNorm | 0x9272 | GL_COMPRESSED_RG11_EAC |
Qt3DRender::QAbstractTexture::RG11_EAC_SNorm | 0x9273 | GL_COMPRESSED_SIGNED_RG11_EAC |
Qt3DRender::QAbstractTexture::RGB8_ETC2 | 0x9274 | GL_COMPRESSED_RGB8_ETC2 |
Qt3DRender::QAbstractTexture::SRGB8_ETC2 | 0x9275 | GL_COMPRESSED_SRGB8_ETC2 |
Qt3DRender::QAbstractTexture::RGB8_PunchThrough_Alpha1_ETC2 | 0x9276 | GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 |
Qt3DRender::QAbstractTexture::SRGB8_PunchThrough_Alpha1_ETC2 | 0x9277 | GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 |
Qt3DRender::QAbstractTexture::RGBA8_ETC2_EAC | 0x9278 | GL_COMPRESSED_RGBA8_ETC2_EAC |
Qt3DRender::QAbstractTexture::SRGB8_Alpha8_ETC2_EAC | 0x9279 | GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC |
Qt3DRender::QAbstractTexture::RGB8_ETC1 | 0x8D64 | GL_ETC1_RGB8_OES |
Qt3DRender::QAbstractTexture::SRGB8 | 0x8C41 | GL_SRGB8 |
Qt3DRender::QAbstractTexture::SRGB8_Alpha8 | 0x8C43 | GL_SRGB8_ALPHA8 |
Qt3DRender::QAbstractTexture::SRGB_DXT1 | 0x8C4C | GL_COMPRESSED_SRGB_S3TC_DXT1_EXT |
Qt3DRender::QAbstractTexture::SRGB_Alpha_DXT1 | 0x8C4D | GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT |
Qt3DRender::QAbstractTexture::SRGB_Alpha_DXT3 | 0x8C4E | GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT |
Qt3DRender::QAbstractTexture::SRGB_Alpha_DXT5 | 0x8C4F | GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT |
Qt3DRender::QAbstractTexture::SRGB_BP_UNorm | 0x8E8D | GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB |
Qt3DRender::QAbstractTexture::DepthFormat | 0x1902 | GL_DEPTH_COMPONENT |
Qt3DRender::QAbstractTexture::AlphaFormat | 0x1906 | GL_ALPHA |
Qt3DRender::QAbstractTexture::RGBFormat | 0x1907 | GL_RGB |
Qt3DRender::QAbstractTexture::RGBAFormat | 0x1908 | GL_RGBA |
Qt3DRender::QAbstractTexture::LuminanceFormat | 0x1909 | GL_LUMINANCE |
Qt3DRender::QAbstractTexture::LuminanceAlphaFormat | 0x190A | 0x190A |
Property Documentation
comparisonFunction : ComparisonFunction
Holds the comparison function of the texture provider.
Access functions:
Qt3DRender::QAbstractTexture::ComparisonFunction | comparisonFunction() const |
void | setComparisonFunction(Qt3DRender::QAbstractTexture::ComparisonFunction function) |
Notifier signal:
void | comparisonFunctionChanged(Qt3DRender::QAbstractTexture::ComparisonFunction comparisonFunction) |
comparisonMode : ComparisonMode
Holds the comparison mode of the texture provider.
Access functions:
Qt3DRender::QAbstractTexture::ComparisonMode | comparisonMode() const |
void | setComparisonMode(Qt3DRender::QAbstractTexture::ComparisonMode mode) |
Notifier signal:
void | comparisonModeChanged(Qt3DRender::QAbstractTexture::ComparisonMode comparisonMode) |
depth : int
Holds the depth of the texture provider.
Access functions:
Notifier signal:
void | depthChanged(int depth) |
format : TextureFormat
Holds the format of the texture provider.
Access functions:
Qt3DRender::QAbstractTexture::TextureFormat | format() const |
void | setFormat(Qt3DRender::QAbstractTexture::TextureFormat format) |
Notifier signal:
void | formatChanged(Qt3DRender::QAbstractTexture::TextureFormat format) |
generateMipMaps : bool
Holds whether the texture provider should auto generate mipmaps.
Access functions:
bool | generateMipMaps() const |
void | setGenerateMipMaps(bool gen) |
Notifier signal:
void | generateMipMapsChanged(bool generateMipMaps) |
[read-only]
handle : const QVariant
Holds the current texture handle, if Qt 3D is using the OpenGL renderer, handle is a texture id integer.
Access functions:
QVariant | handle() const |
Notifier signal:
void | handleChanged(QVariant handle) |
[read-only]
handleType : const HandleType
Holds the current texture handle type.
Access functions:
Qt3DRender::QAbstractTexture::HandleType | handleType() const |
Notifier signal:
void | handleTypeChanged(Qt3DRender::QAbstractTexture::HandleType handleType) |
height : int
Holds the height of the texture provider.
Access functions:
Notifier signal:
void | heightChanged(int height) |
layers : int
Holds the maximum layer count of the texture provider. By default, the maximum layer count is 1.
Note: this has a meaning only for texture providers that have 3D or array target formats.
Access functions:
Notifier signal:
void | layersChanged(int layers) |
magnificationFilter : Filter
Holds the magnification filter of the texture provider.
Access functions:
Qt3DRender::QAbstractTexture::Filter | magnificationFilter() const |
void | setMagnificationFilter(Qt3DRender::QAbstractTexture::Filter f) |
Notifier signal:
void | magnificationFilterChanged(Qt3DRender::QAbstractTexture::Filter magnificationFilter) |
maximumAnisotropy : float
Holds the maximum anisotropy of the texture provider.
Access functions:
float | maximumAnisotropy() const |
void | setMaximumAnisotropy(float anisotropy) |
Notifier signal:
void | maximumAnisotropyChanged(float maximumAnisotropy) |
minificationFilter : Filter
Holds the minification filter of the texture provider.
Access functions:
Qt3DRender::QAbstractTexture::Filter | minificationFilter() const |
void | setMinificationFilter(Qt3DRender::QAbstractTexture::Filter f) |
Notifier signal:
void | minificationFilterChanged(Qt3DRender::QAbstractTexture::Filter minificationFilter) |
mipLevels : int
Holds the mipmap levels of the texture provider.
Access functions:
int | mipLevels() const |
void | setMipLevels(int mipLevels) |
Notifier signal:
void | mipLevelsChanged(int mipLevels) |
samples : int
Holds the number of samples per texel for the texture provider. By default, the number of samples is 1.
Note: this has a meaning only for texture providers that have multisample formats.
Access functions:
int | samples() const |
void | setSamples(int samples) |
Notifier signal:
void | samplesChanged(int samples) |
[read-only]
status : const Status
Holds the current status of the texture provider.
Access functions:
Qt3DRender::QAbstractTexture::Status | status() const |
Notifier signal:
void | statusChanged(Qt3DRender::QAbstractTexture::Status status) |
[read-only]
target : const Target
Holds the target format of the texture provider.
Note: The target format can only be set once.
Access functions:
Qt3DRender::QAbstractTexture::Target | target() const |
width : int
Holds the width of the texture provider.
Access functions:
Notifier signal:
void | widthChanged(int width) |
[read-only]
wrapMode : Qt3DRender::QTextureWrapMode* const
Holds the wrap mode of the texture provider.
Access functions:
Qt3DRender::QTextureWrapMode * | wrapMode() |
Member Function Documentation
[explicit protected]
QAbstractTexture::QAbstractTexture(Qt3DCore::QNode *parent = nullptr)
The constructor creates a new QAbstractTexture::QAbstractTexture instance with the specified parent.
[explicit protected]
QAbstractTexture::QAbstractTexture(Qt3DRender::QAbstractTexture::Target target, Qt3DCore::QNode *parent = nullptr)
The constructor creates a new QAbstractTexture::QAbstractTexture instance with the specified target and parent.
void QAbstractTexture::addTextureImage(Qt3DRender::QAbstractTextureImage *textureImage)
Adds a new Qt3DCore::QAbstractTextureImage textureImage to the texture provider.
Note: Qt3DRender::QAbstractTextureImage should never be shared between multiple Qt3DRender::QAbstractTexture instances.
Qt3DRender::QAbstractTexture::ComparisonFunction QAbstractTexture::comparisonFunction() const
Returns the current comparison function.
Note: Getter function for property comparisonFunction.
See also setComparisonFunction().
Qt3DRender::QAbstractTexture::ComparisonMode QAbstractTexture::comparisonMode() const
Returns the current comparison mode.
Note: Getter function for property comparisonMode.
See also setComparisonMode().
int QAbstractTexture::depth() const
Returns the depth of the texture
Note: Getter function for property depth.
See also setDepth().
Qt3DRender::QAbstractTexture::TextureFormat QAbstractTexture::format() const
Returns the texture provider's format.
Note: Getter function for property format.
See also setFormat().
QVariant QAbstractTexture::handle() const
Returns the current texture handle, if Qt 3D is using the OpenGL renderer, handle is a texture id integer.
Note: Getter function for property handle.
Qt3DRender::QAbstractTexture::HandleType QAbstractTexture::handleType() const
Returns the current texture handle type.
Note: Getter function for property handleType.
int QAbstractTexture::height() const
Returns the height of the texture
Note: Getter function for property height.
See also setHeight().
int QAbstractTexture::layers() const
Returns the maximum number of layers for the texture provider.
Note: this has a meaning only for texture providers that have 3D or array target formats.
Note: Getter function for property layers.
See also setLayers().
float QAbstractTexture::maximumAnisotropy() const
Returns the current maximum anisotropy
Note: Getter function for property maximumAnisotropy.
See also setMaximumAnisotropy().
void QAbstractTexture::removeTextureImage(Qt3DRender::QAbstractTextureImage *textureImage)
Removes a Qt3DCore::QAbstractTextureImage textureImage from the texture provider.
int QAbstractTexture::samples() const
Returns the number of samples per texel for the texture provider.
Note: this has a meaning only for texture providers that have multisample formats.
Note: Getter function for property samples.
See also setSamples().
[slot]
void QAbstractTexture::setComparisonFunction(Qt3DRender::QAbstractTexture::ComparisonFunction function)
Set the comparison function to function.
Note: Setter function for property comparisonFunction.
See also comparisonFunction().
[slot]
void QAbstractTexture::setComparisonMode(Qt3DRender::QAbstractTexture::ComparisonMode mode)
Set the comparison mode to mode.
Note: Setter function for property comparisonMode.
See also comparisonMode().
[slot]
void QAbstractTexture::setDepth(int depth)
Set the depth of the texture to depth.
Note: Setter function for property depth.
See also depth().
[slot]
void QAbstractTexture::setFormat(Qt3DRender::QAbstractTexture::TextureFormat format)
Set the texture format to format.
Note: Setter function for property format.
See also format().
[slot]
void QAbstractTexture::setGenerateMipMaps(bool gen)
Boolean parameter gen sets a flag indicating whether the texture provider should generate mipmaps or not.
Note: Setter function for property generateMipMaps.
See also generateMipMaps().
[slot]
void QAbstractTexture::setHeight(int height)
Set the height to height.
Note: Setter function for property height.
See also height().
[slot]
void QAbstractTexture::setLayers(int layers)
Set the maximum layer count to layers.
Note: Setter function for property layers.
See also layers().
[slot]
void QAbstractTexture::setMagnificationFilter(Qt3DRender::QAbstractTexture::Filter f)
Set the magnification filter to f.
Note: Setter function for property magnificationFilter.
See also magnificationFilter().
[slot]
void QAbstractTexture::setMaximumAnisotropy(float anisotropy)
Sets the maximum anisotropy to anisotropy.
Note: Setter function for property maximumAnisotropy.
See also maximumAnisotropy().
[slot]
void QAbstractTexture::setMinificationFilter(Qt3DRender::QAbstractTexture::Filter f)
Set the minification filter to the specified value f.
Note: Setter function for property minificationFilter.
See also minificationFilter().
[slot]
void QAbstractTexture::setSamples(int samples)
Set the number of samples per texel to samples.
Note: Setter function for property samples.
See also samples().
void QAbstractTexture::setSize(int w, int h = 1, int d = 1)
Sets the size of the texture provider to width w, height h and depth d.
[protected]
void QAbstractTexture::setStatus(Qt3DRender::QAbstractTexture::Status status)
Set the status of the texture provider to the specified status.
See also status().
[slot]
void QAbstractTexture::setWidth(int width)
Set the width of the texture provider to width.
Note: Setter function for property width.
See also width().
void QAbstractTexture::setWrapMode(const Qt3DRender::QTextureWrapMode &wrapMode)
Set the wrapmode to the value specified in wrapMode.
See also wrapMode().
Qt3DRender::QAbstractTexture::Status QAbstractTexture::status() const
Returns the current status of the texture provider.
Note: Getter function for property status.
See also setStatus().
Qt3DRender::QAbstractTexture::Target QAbstractTexture::target() const
Returns the target format of the texture provider.
Note: Getter function for property target.
QList<Qt3DRender::QAbstractTextureImage *> QAbstractTexture::textureImages() const
Returns a list of pointers to QAbstractTextureImage objects contained in the texture provider.
[invokable]
void QAbstractTexture::updateData(const Qt3DRender::QTextureDataUpdate &update)
Updates a sub region of the texture, defined by update, without having to change the data generator or rely on adding or removing texture images.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
int QAbstractTexture::width() const
Returns the width of the texture
Note: Getter function for property width.
See also setWidth().
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.