In questa pagina

Qt3DRender::QAbstractTexture Class

class Qt3DRender::QAbstractTexture

Una classe base da utilizzare per fornire texture. Maggiori informazioni...

Intestazione: #include <qabstracttexture.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
In QML: AbstractTexture
Eredita da: Qt3DCore::QNode
Ereditato da:
13 tipi

Qt3DRender::QSharedGLTexture, Qt3DRender::QTexture1D, Qt3DRender::QTexture1DArray, Qt3DRender::QTexture2D, Qt3DRender::QTexture2DArray, Qt3DRender::QTexture2DMultisample, Qt3DRender::QTexture2DMultisampleArray, Qt3DRender::QTexture3D, Qt3DRender::QTextureBuffer, Qt3DRender::QTextureCubeMap, Qt3DRender::QTextureCubeMapArray, Qt3DRender::QTextureLoader e Qt3DRender::QTextureRectangle

Stato: Obsoleta

Questa classe è deprecata. Si sconsiglia vivamente di utilizzarla nel nuovo codice.

Tipi pubblici

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 }

Proprietà

Funzioni pubbliche

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()

Slot pubblici

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)

Segnali

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)

Funzioni protette

QAbstractTexture(Qt3DCore::QNode *parent = nullptr)
QAbstractTexture(Qt3DRender::QAbstractTexture::Target target, Qt3DCore::QNode *parent = nullptr)
void setStatus(Qt3DRender::QAbstractTexture::Status status)

Descrizione dettagliata

La classe QAbstractTexture non dovrebbe essere utilizzata direttamente, ma piuttosto tramite una delle sue sottoclassi. Ogni sottoclasse implementa un determinato target di texture (2D, 2DArray, 3D, CubeMap ...). Ogni sottoclasse fornisce un insieme di funtori per ogni livello, faccia della mappa cubica e livello di mipmap. A sua volta, il backend utilizza tali funtori per riempire correttamente con i dati la corrispondente texture OpenGL. Ci si aspetta che il funtore esegua il minor numero possibile di elaborazioni, in modo da non rallentare la generazione e il caricamento delle texture. Se il contenuto di una texture è il risultato di un processo di generazione procedurale lento, si raccomanda di non implementarlo direttamente in un funtore.

Tutte le texture sono uniche. Se si istanzia due volte la stessa texture, verranno create 2 texture identiche sulla GPU; non avverrà alcuna condivisione.

Documentazione sui tipi dei membri

enum QAbstractTexture::CubeMapFace

Questa enumerazione identifica le facce di una texture a mappa cubica

CostanteValoreDescrizione
Qt3DRender::QAbstractTexture::CubeMapPositiveX0x8515Specifica la faccia X positiva di una mappa cubica
Qt3DRender::QAbstractTexture::CubeMapNegativeX0x8516Specifica la faccia X negativa di una mappa cubica
Qt3DRender::QAbstractTexture::CubeMapPositiveY0x8517Specifica la faccia Y positiva di una mappa cubica
Qt3DRender::QAbstractTexture::CubeMapNegativeY0x8518Specificare la faccia Y negativa di una mappa cubica
Qt3DRender::QAbstractTexture::CubeMapPositiveZ0x8519Specificare la faccia Z positiva di una mappa cubica
Qt3DRender::QAbstractTexture::CubeMapNegativeZ0x851ASpecificare la faccia Z negativa di una mappa cubica
Qt3DRender::QAbstractTexture::AllFaces0x851bSpecificare tutte le facce di una mappa cubica

Nota: AllFaces dovrebbe essere utilizzato solo quando è necessario applicare un comportamento a tutte le facce di una mappa cubica. Questo avviene, ad esempio, quando si utilizza una mappa cubica come texture di attacco. L'uso di AllFaces nella specifica di attacco comporterebbe il collegamento di tutte le facce al punto di attacco. D'altra parte, se viene specificata una faccia specifica, l’attaccamento utilizzerebbe solo la faccia specificata.

enum QAbstractTexture::Filter

Contiene il tipo di filtro del provider di texture.

CostanteValoreDescrizione
Qt3DRender::QAbstractTexture::Nearest0x2600GL_NEAREST
Qt3DRender::QAbstractTexture::Linear0x2601GL_LINEAR
Qt3DRender::QAbstractTexture::NearestMipMapNearest0x2700GL_NEAREST_MIPMAP_NEAREST
Qt3DRender::QAbstractTexture::NearestMipMapLinear0x2702GL_NEAREST_MIPMAP_LINEAR
Qt3DRender::QAbstractTexture::LinearMipMapNearest0x2701GL_LINEAR_MIPMAP_NEAREST
Qt3DRender::QAbstractTexture::LinearMipMapLinear0x2703GL_LINEAR_MIPMAP_LINEAR

enum QAbstractTexture::Status

Contiene lo stato del provider di texture.

CostanteValore
Qt3DRender::QAbstractTexture::None0
Qt3DRender::QAbstractTexture::Loading1
Qt3DRender::QAbstractTexture::Ready2
Qt3DRender::QAbstractTexture::Error3

enum QAbstractTexture::Target

CostanteValoreDescrizione
Qt3DRender::QAbstractTexture::TargetAutomatic0Il bersaglio verrà determinato dal motore Qt3D
Qt3DRender::QAbstractTexture::Target1D0x0DE0GL_TEXTURE_1D
Qt3DRender::QAbstractTexture::Target1DArray0x8C18GL_TEXTURE_1D_ARRAY
Qt3DRender::QAbstractTexture::Target2D0x0DE1GL_TEXTURE_2D
Qt3DRender::QAbstractTexture::Target2DArray0x8C1AGL_TEXTURE_2D_ARRAY
Qt3DRender::QAbstractTexture::Target3D0x806FGL_TEXTURE_3D
Qt3DRender::QAbstractTexture::TargetCubeMap0x8513GL_TEXTURE_CUBE_MAP
Qt3DRender::QAbstractTexture::TargetCubeMapArray0x9009GL_TEXTURE_CUBE_MAP_ARRAY
Qt3DRender::QAbstractTexture::Target2DMultisample0x9100GL_TEXTURE_2D_MULTISAMPLE
Qt3DRender::QAbstractTexture::Target2DMultisampleArray0x9102GL_TEXTURE_2D_MULTISAMPLE_ARRAY
Qt3DRender::QAbstractTexture::TargetRectangle0x84F5GL_TEXTURE_RECTANGLE
Qt3DRender::QAbstractTexture::TargetBuffer0x8C2AGL_TEXTURE_BUFFER

enum QAbstractTexture::TextureFormat

Questo elenco descrive tutti i formati di texture possibili

CostanteValoreDescrizione
Qt3DRender::QAbstractTexture::NoFormat0GL_NONE
Qt3DRender::QAbstractTexture::Automatic1determina_automaticamente_il_formato
Qt3DRender::QAbstractTexture::R8_UNorm0x8229GL_R8
Qt3DRender::QAbstractTexture::RG8_UNorm0x822BGL_RG8
Qt3DRender::QAbstractTexture::RGB8_UNorm0x8051GL_RGB8
Qt3DRender::QAbstractTexture::RGBA8_UNorm0x8058GL_RGBA8
Qt3DRender::QAbstractTexture::R16_UNorm0x822AGL_R16
Qt3DRender::QAbstractTexture::RG16_UNorm0x822CGL_RG16
Qt3DRender::QAbstractTexture::RGB16_UNorm0x8054GL_RGB16
Qt3DRender::QAbstractTexture::RGBA16_UNorm0x805BGL_RGBA16
Qt3DRender::QAbstractTexture::R8_SNorm0x8F94GL_R8_SNORM
Qt3DRender::QAbstractTexture::RG8_SNorm0x8F95GL_RG8_SNORM
Qt3DRender::QAbstractTexture::RGB8_SNorm0x8F96GL_RGB8_SNORM
Qt3DRender::QAbstractTexture::RGBA8_SNorm0x8F97GL_RGBA8_SNORM
Qt3DRender::QAbstractTexture::R16_SNorm0x8F98GL_R16_SNORM
Qt3DRender::QAbstractTexture::RG16_SNorm0x8F99GL_RG16_SNORM
Qt3DRender::QAbstractTexture::RGB16_SNorm0x8F9AGL_RGB16_SNORM
Qt3DRender::QAbstractTexture::RGBA16_SNorm0x8F9BGL_RGBA16_SNORM
Qt3DRender::QAbstractTexture::R8U0x8232GL_R8UI
Qt3DRender::QAbstractTexture::RG8U0x8238GL_RG8UI
Qt3DRender::QAbstractTexture::RGB8U0x8D7DGL_RGB8UI
Qt3DRender::QAbstractTexture::RGBA8U0x8D7CGL_RGBA8UI
Qt3DRender::QAbstractTexture::R16U0x8234GL_R16UI
Qt3DRender::QAbstractTexture::RG16U0x823AGL_RG16UI
Qt3DRender::QAbstractTexture::RGB16U0x8D77GL_RGB16UI
Qt3DRender::QAbstractTexture::RGBA16U0x8D76GL_RGBA16UI
Qt3DRender::QAbstractTexture::R32U0x8236GL_R32UI
Qt3DRender::QAbstractTexture::RG32U0x823CGL_RG32UI
Qt3DRender::QAbstractTexture::RGB32U0x8D71GL_RGB32UI
Qt3DRender::QAbstractTexture::RGBA32U0x8D70GL_RGBA32UI
Qt3DRender::QAbstractTexture::R8I0x8231GL_R8I
Qt3DRender::QAbstractTexture::RG8I0x8237GL_RG8I
Qt3DRender::QAbstractTexture::RGB8I0x8D8FGL_RGB8I
Qt3DRender::QAbstractTexture::RGBA8I0x8D8EGL_RGBA8I
Qt3DRender::QAbstractTexture::R16I0x8233GL_R16I
Qt3DRender::QAbstractTexture::RG16I0x8239GL_RG16I
Qt3DRender::QAbstractTexture::RGB16I0x8D89GL_RGB16I
Qt3DRender::QAbstractTexture::RGBA16I0x8D88GL_RGBA16I
Qt3DRender::QAbstractTexture::R32I0x8235GL_R32I
Qt3DRender::QAbstractTexture::RG32I0x823BGL_RG32I
Qt3DRender::QAbstractTexture::RGB32I0x8D83GL_RGB32I
Qt3DRender::QAbstractTexture::RGBA32I0x8D82GL_RGBA32I
Qt3DRender::QAbstractTexture::R16F0x822DGL_R16F
Qt3DRender::QAbstractTexture::RG16F0x822FGL_RG16F
Qt3DRender::QAbstractTexture::RGB16F0x881BGL_RGB16F
Qt3DRender::QAbstractTexture::RGBA16F0x881AGL_RGBA16F
Qt3DRender::QAbstractTexture::R32F0x822EGL_R32F
Qt3DRender::QAbstractTexture::RG32F0x8230GL_RG32F
Qt3DRender::QAbstractTexture::RGB32F0x8815GL_RGB32F
Qt3DRender::QAbstractTexture::RGBA32F0x8814GL_RGBA32F
Qt3DRender::QAbstractTexture::RGB9E50x8C3DGL_RGB9_E5
Qt3DRender::QAbstractTexture::RG11B10F0x8C3AGL_R11F_G11F_B10F
Qt3DRender::QAbstractTexture::RG3B20x2A10GL_R3_G3_B2
Qt3DRender::QAbstractTexture::R5G6B50x8D62GL_RGB565
Qt3DRender::QAbstractTexture::RGB5A10x8057GL_RGB5_A1
Qt3DRender::QAbstractTexture::RGBA40x8056GL_RGBA4
Qt3DRender::QAbstractTexture::RGB10A20x8059GL_RGB10_A2
Qt3DRender::QAbstractTexture::RGB10A2U0x906FGL_RGB10_A2UI
Qt3DRender::QAbstractTexture::D160x81A5GL_DEPTH_COMPONENT16
Qt3DRender::QAbstractTexture::D240x81A6GL_DEPTH_COMPONENT24
Qt3DRender::QAbstractTexture::D24S80x88F0GL_DEPTH24_STENCIL8
Qt3DRender::QAbstractTexture::D320x81A7GL_DEPTH_COMPONENT32
Qt3DRender::QAbstractTexture::D32F0x8CACGL_DEPTH_COMPONENT32F
Qt3DRender::QAbstractTexture::D32FS8X240x8CADGL_DEPTH32F_STENCIL8
Qt3DRender::QAbstractTexture::RGB_DXT10x83F0GL_COMPRESSED_RGB_S3TC_DXT1_EXT
Qt3DRender::QAbstractTexture::RGBA_DXT10x83F1GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
Qt3DRender::QAbstractTexture::RGBA_DXT30x83F2GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
Qt3DRender::QAbstractTexture::RGBA_DXT50x83F3GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
Qt3DRender::QAbstractTexture::R_ATI1N_UNorm0x8DBBGL_COMPRESSED_RED_RGTC1
Qt3DRender::QAbstractTexture::R_ATI1N_SNorm0x8DBCGL_COMPRESSED_SIGNED_RED_RGTC1
Qt3DRender::QAbstractTexture::RG_ATI2N_UNorm0x8DBDGL_COMPRESSED_RG_RGTC2
Qt3DRender::QAbstractTexture::RG_ATI2N_SNorm0x8DBEGL_COMPRESSED_SIGNED_RG_RGTC2
Qt3DRender::QAbstractTexture::RGB_BP_UNSIGNED_FLOAT0x8E8FGL_COMPRESSED_RGB_BPTC_SENZA_SEGNO_FLOAT_ARB
Qt3DRender::QAbstractTexture::RGB_BP_SIGNED_FLOAT0x8E8EGL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
Qt3DRender::QAbstractTexture::RGB_BP_UNorm0x8E8CGL_COMPRESSED_RGBA_BPTC_UNORM_ARB
Qt3DRender::QAbstractTexture::R11_EAC_UNorm0x9270GL_COMPRESSED_R11_EAC
Qt3DRender::QAbstractTexture::R11_EAC_SNorm0x9271GL_COMPRESSED_SIGNED_R11_EAC
Qt3DRender::QAbstractTexture::RG11_EAC_UNorm0x9272GL_COMPRESSED_RG11_EAC
Qt3DRender::QAbstractTexture::RG11_EAC_SNorm0x9273GL_COMPRESSED_SIGNED_RG11_EAC
Qt3DRender::QAbstractTexture::RGB8_ETC20x9274GL_COMPRESSED_RGB8_ETC2
Qt3DRender::QAbstractTexture::SRGB8_ETC20x9275GL_COMPRESSED_SRGB8_ETC2
Qt3DRender::QAbstractTexture::RGB8_PunchThrough_Alpha1_ETC20x9276GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
Qt3DRender::QAbstractTexture::SRGB8_PunchThrough_Alpha1_ETC20x9277GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
Qt3DRender::QAbstractTexture::RGBA8_ETC2_EAC0x9278GL_COMPRESSED_RGBA8_ETC2_EAC
Qt3DRender::QAbstractTexture::SRGB8_Alpha8_ETC2_EAC0x9279GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
Qt3DRender::QAbstractTexture::RGB8_ETC10x8D64GL_ETC1_RGB8_OES
Qt3DRender::QAbstractTexture::SRGB80x8C41GL_SRGB8
Qt3DRender::QAbstractTexture::SRGB8_Alpha80x8C43GL_SRGB8_ALPHA8
Qt3DRender::QAbstractTexture::SRGB_DXT10x8C4CGL_COMPRESSED_SRGB_S3TC_DXT1_EXT
Qt3DRender::QAbstractTexture::SRGB_Alpha_DXT10x8C4DGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT
Qt3DRender::QAbstractTexture::SRGB_Alpha_DXT30x8C4EGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT
Qt3DRender::QAbstractTexture::SRGB_Alpha_DXT50x8C4FGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
Qt3DRender::QAbstractTexture::SRGB_BP_UNorm0x8E8DGL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB
Qt3DRender::QAbstractTexture::DepthFormat0x1902GL_DEPTH_COMPONENT
Qt3DRender::QAbstractTexture::AlphaFormat0x1906GL_ALPHA
Qt3DRender::QAbstractTexture::RGBFormat0x1907GL_RGB
Qt3DRender::QAbstractTexture::RGBAFormat0x1908GL_RGBA
Qt3DRender::QAbstractTexture::LuminanceFormat0x1909GL_LUMINANZA
Qt3DRender::QAbstractTexture::LuminanceAlphaFormat0x190A0x190A

Documentazione delle proprietà

comparisonFunction : ComparisonFunction

Contiene la funzione di confronto del provider di texture.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::ComparisonFunction comparisonFunction() const
void setComparisonFunction(Qt3DRender::QAbstractTexture::ComparisonFunction function)

Segnale di notifica:

void comparisonFunctionChanged(Qt3DRender::QAbstractTexture::ComparisonFunction comparisonFunction)

comparisonMode : ComparisonMode

Contiene la modalità di confronto del provider di texture.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::ComparisonMode comparisonMode() const
void setComparisonMode(Qt3DRender::QAbstractTexture::ComparisonMode mode)

Segnale di notifica:

void comparisonModeChanged(Qt3DRender::QAbstractTexture::ComparisonMode comparisonMode)

depth : int

Contiene la profondità del provider di texture.

Funzioni di accesso:

int depth() const
void setDepth(int depth)

Segnale del notificatore:

void depthChanged(int depth)

format : TextureFormat

Contiene il formato del provider di texture.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::TextureFormat format() const
void setFormat(Qt3DRender::QAbstractTexture::TextureFormat format)

Segnale di notifica:

void formatChanged(Qt3DRender::QAbstractTexture::TextureFormat format)

generateMipMaps : bool

Indica se il provider di texture deve generare automaticamente le mipmap.

Funzioni di accesso:

bool generateMipMaps() const
void setGenerateMipMaps(bool gen)

Segnale del notificatore:

void generateMipMapsChanged(bool generateMipMaps)

[read-only] handle : QVariant

Contiene l'handle della texture corrente; se Qt 3D utilizza il renderer OpenGL, l'handle è un numero intero che identifica la texture.

Funzioni di accesso:

QVariant handle() const

Segnale di notifica:

void handleChanged(QVariant handle)

[read-only] handleType : HandleType

Contiene il tipo di handle della texture corrente.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::HandleType handleType() const

Segnale di notifica:

void handleTypeChanged(Qt3DRender::QAbstractTexture::HandleType handleType)

height : int

Contiene l'altezza del provider di texture.

Funzioni di accesso:

int height() const
void setHeight(int height)

Segnale di notifica:

void heightChanged(int height)

layers : int

Contiene il numero massimo di livelli del provider di texture. Per impostazione predefinita, il numero massimo di livelli è 1.

Nota: questo ha significato solo per i provider di texture che hanno formati di destinazione 3D o array.

Funzioni di accesso:

int layers() const
void setLayers(int layers)

Segnale di notifica:

void layersChanged(int layers)

magnificationFilter : Filter

Contiene il filtro di ingrandimento del provider di texture.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::Filter magnificationFilter() const
void setMagnificationFilter(Qt3DRender::QAbstractTexture::Filter f)

Segnale di notifica:

void magnificationFilterChanged(Qt3DRender::QAbstractTexture::Filter magnificationFilter)

maximumAnisotropy : float

Contiene il valore massimo di anisotropia del provider di texture.

Funzioni di accesso:

float maximumAnisotropy() const
void setMaximumAnisotropy(float anisotropy)

Segnale di notifica:

void maximumAnisotropyChanged(float maximumAnisotropy)

minificationFilter : Filter

Contiene il filtro di minificazione del provider di texture.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::Filter minificationFilter() const
void setMinificationFilter(Qt3DRender::QAbstractTexture::Filter f)

Segnale di notifica:

void minificationFilterChanged(Qt3DRender::QAbstractTexture::Filter minificationFilter)

mipLevels : int

Contiene i livelli di mipmap del provider di texture.

Funzioni di accesso:

int mipLevels() const
void setMipLevels(int mipLevels)

Segnale di notifica:

void mipLevelsChanged(int mipLevels)

samples : int

Contiene il numero di campioni per texel per il provider di texture. Per impostazione predefinita, il numero di campioni è 1.

Nota: questo ha significato solo per i provider di texture che dispongono di formati multisample.

Funzioni di accesso:

int samples() const
void setSamples(int samples)

Segnale di notifica:

void samplesChanged(int samples)

[read-only] status : Status

Contiene lo stato corrente del provider di texture.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::Status status() const

Segnale di notifica:

void statusChanged(Qt3DRender::QAbstractTexture::Status status)

[read-only] target : const Target

Contiene il formato di destinazione del provider di texture.

Nota: il formato di destinazione può essere impostato una sola volta.

Funzioni di accesso:

Qt3DRender::QAbstractTexture::Target target() const

width : int

Contiene la larghezza del provider di texture.

Funzioni di accesso:

int width() const
void setWidth(int width)

Segnale di notifica:

void widthChanged(int width)

[read-only] wrapMode : Qt3DRender::QTextureWrapMode* const

Contiene la modalità di avvolgimento del provider di texture.

Funzioni di accesso:

Qt3DRender::QTextureWrapMode *wrapMode()

Documentazione delle funzioni membro

[explicit protected] QAbstractTexture::QAbstractTexture(Qt3DCore::QNode *parent = nullptr)

Il costruttore crea una nuova istanza di ` QAbstractTexture::QAbstractTexture ` con l'parent` specificato.

[explicit protected] QAbstractTexture::QAbstractTexture(Qt3DRender::QAbstractTexture::Target target, Qt3DCore::QNode *parent = nullptr)

Il costruttore crea una nuova istanza di ` QAbstractTexture::QAbstractTexture ` con i valori specificati per ` target ` e ` parent`.

void QAbstractTexture::addTextureImage(Qt3DRender::QAbstractTextureImage *textureImage)

Aggiunge un nuovo oggetto ` textureImage ` di tipo `QAbstractTextureImage` di Qt3DCore al provider di texture.

Nota: Qt3DRender ::QAbstractTextureImage non deve mai essere condiviso tra più istanze di Qt3DRender::QAbstractTexture.

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

Restituisce la funzione di confronto corrente.

Nota: Funzionegetter per la proprietà comparisonFunction.

Vedi anche ` setComparisonFunction()`.

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

Restituisce la modalità di confronto corrente.

Nota: Funzionegetter per la proprietà comparisonMode.

Vedi anche setComparisonMode().

int QAbstractTexture::depth() const

Restituisce la profondità della texture

Nota: Funzionegetter per la proprietà depth.

Vedi anche setDepth().

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

Restituisce il formato del provider di texture.

Nota: Funzionegetter per la proprietà format.

Vedi anche setFormat().

QVariant QAbstractTexture::handle() const

Restituisce l'handle della texture corrente, se Qt 3D utilizza il renderer OpenGL; handle è un numero intero che identifica la texture.

Nota: Funzionegetter per la proprietà handle.

Qt3DRender::QAbstractTexture::HandleType QAbstractTexture::handleType() const

Restituisce il tipo di handle della texture corrente.

Nota: Funzionegetter per la proprietà handleType.

int QAbstractTexture::height() const

Restituisce l'altezza della texture

Nota: Funzionegetter per la proprietà height.

Vedi anche setHeight().

int QAbstractTexture::layers() const

Restituisce il numero massimo di livelli per il provider di texture.

Nota: questo ha senso solo per i provider di texture che hanno formati di destinazione 3D o array.

Nota: funzionegetter per la proprietà layers.

Vedi anche ` setLayers()`.

float QAbstractTexture::maximumAnisotropy() const

Restituisce l'anisotropia massima corrente

Nota: Funzionegetter per la proprietà `maximumAnisotropy`.

Vedi anche ` setMaximumAnisotropy()`.

void QAbstractTexture::removeTextureImage(Qt3DRender::QAbstractTextureImage *textureImage)

Rimuove un oggetto `Qt3DCore::QAbstractTextureImage` textureImage dal provider di texture.

int QAbstractTexture::samples() const

Restituisce il numero di campioni per texel per il provider di texture.

Nota: questo ha significato solo per i provider di texture che dispongono di formati multisample.

Nota: funzionegetter per la proprietà samples.

Vedi anche ` setSamples()`.

[slot] void QAbstractTexture::setComparisonFunction(Qt3DRender::QAbstractTexture::ComparisonFunction function)

Impostare la funzione di confronto su function.

Nota: funzionedi impostazione per la proprietà comparisonFunction.

Vedi anche ` comparisonFunction()` .

[slot] void QAbstractTexture::setComparisonMode(Qt3DRender::QAbstractTexture::ComparisonMode mode)

Impostare la modalità di confronto su " mode".

Nota: funzionesetter per la proprietà comparisonMode.

Vedi anche comparisonMode().

[slot] void QAbstractTexture::setDepth(int depth)

Imposta la profondità della texture su depth.

Nota: funzionesetter per la proprietà depth.

Vedi anche depth().

[slot] void QAbstractTexture::setFormat(Qt3DRender::QAbstractTexture::TextureFormat format)

Imposta il formato della texture su format.

Nota: funzionesetter per la proprietà format.

Vedi anche format().

[slot] void QAbstractTexture::setGenerateMipMaps(bool gen)

Il parametro booleano gen imposta un flag che indica se il provider di texture debba generare o meno le mipmap.

Nota: Funzionesetter per la proprietà generateMipMaps.

Vedi anche generateMipMaps().

[slot] void QAbstractTexture::setHeight(int height)

Imposta l'altezza su height.

Nota: funzionesetter per la proprietà height.

Vedi anche height().

[slot] void QAbstractTexture::setLayers(int layers)

Imposta il numero massimo di livelli su layers.

Nota: funzionesetter per la proprietà layers.

Vedi anche layers().

[slot] void QAbstractTexture::setMagnificationFilter(Qt3DRender::QAbstractTexture::Filter f)

Imposta il filtro di ingrandimento su f.

Nota: funzionedi impostazione per la proprietà magnificationFilter.

Vedi anche ` magnificationFilter()`.

[slot] void QAbstractTexture::setMaximumAnisotropy(float anisotropy)

Imposta l'anisotropia massima su anisotropy.

Nota: Funzionedi impostazione per la proprietà maximumAnisotropy.

Vedi anche maximumAnisotropy().

[slot] void QAbstractTexture::setMinificationFilter(Qt3DRender::QAbstractTexture::Filter f)

Imposta il filtro di minificazione sul valore specificato f.

Nota: funzionesetter per la proprietà minificationFilter.

Vedi anche minificationFilter().

[slot] void QAbstractTexture::setSamples(int samples)

Imposta il numero di campioni per texel su samples.

Nota: funzionedi impostazione per la proprietà samples.

Vedi anche samples().

void QAbstractTexture::setSize(int w, int h = 1, int d = 1)

Imposta le dimensioni del provider di texture su larghezza w, altezza h e profondità d.

[protected] void QAbstractTexture::setStatus(Qt3DRender::QAbstractTexture::Status status)

Imposta lo stato del provider di texture sul valore specificato status.

Vedi anche status().

[slot] void QAbstractTexture::setWidth(int width)

Imposta la larghezza del provider di texture su width.

Nota: funzionesetter per la proprietà width.

Vedi anche width().

void QAbstractTexture::setWrapMode(const Qt3DRender::QTextureWrapMode &wrapMode)

Impostare la modalità di avvolgimento sul valore specificato in wrapMode.

Vedi anche wrapMode().

Qt3DRender::QAbstractTexture::Status QAbstractTexture::status() const

Restituisce lo stato corrente del provider di texture.

Nota: funzionegetter per la proprietà status.

Vedi anche setStatus().

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

Restituisce il formato di destinazione del provider di texture.

Nota: Funzionegetter per la proprietà target.

QList<Qt3DRender::QAbstractTextureImage *> QAbstractTexture::textureImages() const

Restituisce un elenco di puntatori agli oggetti QAbstractTextureImage contenuti nel provider di texture.

[invokable] void QAbstractTexture::updateData(const Qt3DRender::QTextureDataUpdate &update)

Aggiorna una sottoregione della texture, definita da update, senza dover modificare il generatore di dati né ricorrere all'aggiunta o alla rimozione di immagini di texture.

Nota: questa funzione può essere richiamata tramite il sistema dei meta-oggetti e da QML. Vedere Q_INVOKABLE.

int QAbstractTexture::width() const

Restituisce la larghezza della texture

Nota: Funzionegetter per la proprietà width.

Vedi anche setWidth().

© 2026 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.