- Qt 6.10
- Qt 3D
- C++ Classes
- Qt3DRender (Deprecated)
- QTextureData
- Qt 6.10.2 Reference Documentation

# Qt3DRender::QTextureData Class

class Qt3DRender::QTextureData

The QTextureData class stores texture information such as the target, height, width, depth, layers, wrap, and if mipmaps are enabled. More...

Header: | `#include <Qt3DRender/QTextureData>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS 3drender)` `target_link_libraries(mytarget PRIVATE Qt6::3drender)`
qmake: | `QT += 3drender`
Status: | Deprecated

- List of all members, including inherited members

## Public Functions

| QTextureData()
void | addImageData(const Qt3DRender::QTextureImageDataPtr &imageData)
Qt3DRender::QAbstractTexture::ComparisonFunction | comparisonFunction() const
Qt3DRender::QAbstractTexture::ComparisonMode | comparisonMode() const
int | depth() const
Qt3DRender::QAbstractTexture::TextureFormat | format() const
int | height() const
QList<Qt3DRender::QTextureImageDataPtr> | imageData() const
bool | isAutoMipMapGenerationEnabled() const
int | layers() const
Qt3DRender::QAbstractTexture::Filter | magnificationFilter() const
float | maximumAnisotropy() const
Qt3DRender::QAbstractTexture::Filter | minificationFilter() const
void | setAutoMipMapGenerationEnabled(bool autoMipMap)
void | setComparisonFunction(Qt3DRender::QAbstractTexture::ComparisonFunction comparisonFunction)
void | setComparisonMode(Qt3DRender::QAbstractTexture::ComparisonMode comparisonMode)
void | setDepth(int depth)
void | setFormat(Qt3DRender::QAbstractTexture::TextureFormat format)
void | setHeight(int height)
void | setLayers(int layers)
void | setMagnificationFilter(Qt3DRender::QAbstractTexture::Filter filter)
void | setMaximumAnisotropy(float maximumAnisotropy)
void | setMinificationFilter(Qt3DRender::QAbstractTexture::Filter filter)
void | setTarget(Qt3DRender::QAbstractTexture::Target target)
void | setWidth(int width)
void | setWrapModeX(Qt3DRender::QTextureWrapMode::WrapMode wrapModeX)
void | setWrapModeY(Qt3DRender::QTextureWrapMode::WrapMode wrapModeY)
void | setWrapModeZ(Qt3DRender::QTextureWrapMode::WrapMode wrapModeZ)
Qt3DRender::QAbstractTexture::Target | target() const
int | width() const
Qt3DRender::QTextureWrapMode::WrapMode | wrapModeX() const
Qt3DRender::QTextureWrapMode::WrapMode | wrapModeY() const
Qt3DRender::QTextureWrapMode::WrapMode | wrapModeZ() const

## Detailed Description

## Member Function Documentation

### QTextureData::QTextureData()

Creates a new QTextureData instance.

### void QTextureData::addImageData(const Qt3DRender::QTextureImageDataPtr &imageData)

Adds an extra image layer to the texture using imageData.

Note: The texture image should be loaded with the size specified on the texture. However, if no size is specified, the size of the first texture image file is used as default.

### Qt3DRender::QAbstractTexture::ComparisonFunction QTextureData::comparisonFunction() const

Returns the current comparison function.

See also setComparisonFunction().

### Qt3DRender::QAbstractTexture::ComparisonMode QTextureData::comparisonMode() const

Returns the current comparison mode.

See also setComparisonMode().

### int QTextureData::depth() const

Returns the texture depth.

See also setDepth().

### Qt3DRender::QAbstractTexture::TextureFormat QTextureData::format() const

Returns the texture format

See also setFormat().

### int QTextureData::height() const

Returns the texture height.

See also setHeight().

### QList<Qt3DRender::QTextureImageDataPtr> QTextureData::imageData() const

Returns the data of the images used by this texture.

### bool QTextureData::isAutoMipMapGenerationEnabled() const

Returns whether the texture has auto mipmap generation enabled.

### int QTextureData::layers() const

Returns the texture layers.

See also setLayers().

### Qt3DRender::QAbstractTexture::Filter QTextureData::magnificationFilter() const

Returns the current magnification filter.

See also setMagnificationFilter().

### float QTextureData::maximumAnisotropy() const

Returns the current maximum anisotropy.

See also setMaximumAnisotropy().

### Qt3DRender::QAbstractTexture::Filter QTextureData::minificationFilter() const

Returns the current minification filter.

See also setMinificationFilter().

### void QTextureData::setAutoMipMapGenerationEnabled(bool autoMipMap)

Sets whether the texture has automatic mipmap generation enabled, to autoMipMap.

See also isAutoMipMapGenerationEnabled().

### void QTextureData::setComparisonFunction(Qt3DRender::QAbstractTexture::ComparisonFunction comparisonFunction)

Sets the comparison function to comparisonFunction.

See also comparisonFunction().

### void QTextureData::setComparisonMode(Qt3DRender::QAbstractTexture::ComparisonMode comparisonMode)

Sets the comparison mode to comparisonMode.

See also comparisonMode().

### void QTextureData::setDepth(int depth)

Sets the texture depth to depth

See also depth().

### void QTextureData::setFormat(Qt3DRender::QAbstractTexture::TextureFormat format)

Sets the texture format to format.

See also format().

### void QTextureData::setHeight(int height)

Sets the target height to height.

See also height().

### void QTextureData::setLayers(int layers)

Sets the texture layers to layers.

See also layers().

### void QTextureData::setMagnificationFilter(Qt3DRender::QAbstractTexture::Filter filter)

Sets the magnification filter to filter.

See also magnificationFilter().

### void QTextureData::setMaximumAnisotropy(float maximumAnisotropy)

Sets the maximum anisotropy to maximumAnisotropy.

See also maximumAnisotropy().

### void QTextureData::setMinificationFilter(Qt3DRender::QAbstractTexture::Filter filter)

Sets the minification filter to filter.

See also minificationFilter().

### void QTextureData::setTarget(Qt3DRender::QAbstractTexture::Target target)

Sets the target texture to target.

See also target().

### void QTextureData::setWidth(int width)

Sets the texture width to width.

See also width().

### void QTextureData::setWrapModeX(Qt3DRender::QTextureWrapMode::WrapMode wrapModeX)

Sets the wrap mode X to wrapModeX.

See also wrapModeX().

### void QTextureData::setWrapModeY(Qt3DRender::QTextureWrapMode::WrapMode wrapModeY)

Sets the wrap mode Y to wrapModeY.

See also wrapModeY().

### void QTextureData::setWrapModeZ(Qt3DRender::QTextureWrapMode::WrapMode wrapModeZ)

Sets the wrap mode Z to wrapModeZ.

See also wrapModeZ().

### Qt3DRender::QAbstractTexture::Target QTextureData::target() const

Returns the texture data target.

See also setTarget().

### int QTextureData::width() const

Returns the texture width.

See also setWidth().

### Qt3DRender::QTextureWrapMode::WrapMode QTextureData::wrapModeX() const

Returns the current wrap mode X.

See also setWrapModeX().

### Qt3DRender::QTextureWrapMode::WrapMode QTextureData::wrapModeY() const

Returns the current wrap mode Y.

See also setWrapModeY().

### Qt3DRender::QTextureWrapMode::WrapMode QTextureData::wrapModeZ() const

Returns the current wrap mode Z.

See also setWrapModeZ().