En esta página

QRhiSampler Class

Recurso de muestreo. Más...

Cabecera: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
Desde: Qt 6.6
Hereda: QRhiResource

Tipos Públicos

enum AddressMode { Repeat, ClampToEdge, Mirror }
enum CompareOp { Never, Less, Equal, LessOrEqual, Greater, …, Always }
enum Filter { None, Nearest, Linear }

Funciones Públicas

QRhiSampler::AddressMode addressU() const
QRhiSampler::AddressMode addressV() const
QRhiSampler::AddressMode addressW() const
QRhiSampler::Filter magFilter() const
QRhiSampler::Filter minFilter() const
QRhiSampler::Filter mipmapMode() const
void setAddressU(QRhiSampler::AddressMode mode)
void setAddressV(QRhiSampler::AddressMode mode)
void setAddressW(QRhiSampler::AddressMode mode)
void setMagFilter(QRhiSampler::Filter f)
void setMinFilter(QRhiSampler::Filter f)
void setMipmapMode(QRhiSampler::Filter f)
void setTextureCompareOp(QRhiSampler::CompareOp op)
QRhiSampler::CompareOp textureCompareOp() const

Funciones Públicas Reimplementadas

virtual QRhiResource::Type resourceType() const override

Descripción detallada

Nota: Se trata de una API RHI con garantías de compatibilidad limitadas; consulte QRhi para obtener más información.

Documentación de tipos de miembros

enum QRhiSampler::AddressMode

Especifica el modo de direccionamiento

ConstanteValor
QRhiSampler::Repeat0
QRhiSampler::ClampToEdge1
QRhiSampler::Mirror2

enum QRhiSampler::CompareOp

Especifica la función de comparación de texturas.

ConstanteValorDescripción
QRhiSampler::Never0(por defecto)
QRhiSampler::Less1
QRhiSampler::Equal2
QRhiSampler::LessOrEqual3
QRhiSampler::Greater4
QRhiSampler::NotEqual5
QRhiSampler::GreaterOrEqual6
QRhiSampler::Always7

enum QRhiSampler::Filter

Especifica el filtrado de minificación, ampliación o mipmap.

ConstanteValorDescripción
QRhiSampler::None0Aplicable sólo a mipmapMode(), indica que no se utilizarán mipmaps
QRhiSampler::Nearest1
QRhiSampler::Linear2

Documentación de la función miembro

QRhiSampler::AddressMode QRhiSampler::addressU() const

Devuelve el modo de envoltura horizontal.

Véase también setAddressU().

QRhiSampler::AddressMode QRhiSampler::addressV() const

Devuelve el modo de envoltura vertical.

Véase también setAddressV().

QRhiSampler::AddressMode QRhiSampler::addressW() const

Devuelve el modo de envoltura de profundidad.

Véase también setAddressW().

QRhiSampler::Filter QRhiSampler::magFilter() const

Devuelve el modo de filtro de aumento.

Véase también setMagFilter().

QRhiSampler::Filter QRhiSampler::minFilter() const

Devuelve el modo de filtro de minificación.

Véase también setMinFilter().

QRhiSampler::Filter QRhiSampler::mipmapMode() const

Devuelve el modo de filtro mipmap.

Véase también setMipmapMode().

[override virtual] QRhiResource::Type QRhiSampler::resourceType() const

Reimplementa: QRhiResource::resourceType() const.

Devuelve el tipo de recurso.

void QRhiSampler::setAddressU(QRhiSampler::AddressMode mode)

Establece el ajuste horizontal mode.

Véase también addressU().

void QRhiSampler::setAddressV(QRhiSampler::AddressMode mode)

Establece el ajuste vertical mode.

Véase también addressV().

void QRhiSampler::setAddressW(QRhiSampler::AddressMode mode)

Establece la envoltura de profundidad mode.

Véase también addressW().

void QRhiSampler::setMagFilter(QRhiSampler::Filter f)

Establece el modo de filtro de aumento en f.

Véase también magFilter().

void QRhiSampler::setMinFilter(QRhiSampler::Filter f)

Establece el modo de filtro de minificación en f.

Véase también minFilter().

void QRhiSampler::setMipmapMode(QRhiSampler::Filter f)

Establece el modo de filtro mipmap a f.

Déjalo en None cuando la textura no tenga niveles mip, o cuando los niveles mip no deban ser tenidos en cuenta.

Ver también mipmapMode().

void QRhiSampler::setTextureCompareOp(QRhiSampler::CompareOp op)

Establece la función de comparación de texturas op.

Véase también textureCompareOp().

QRhiSampler::CompareOp QRhiSampler::textureCompareOp() const

Devuelve la función de comparación de texturas.

Véase también setTextureCompareOp().

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