Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QRhiSampler Class Referenceabstract

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h More...

#include <qrhi.h>

Inheritance diagram for QRhiSampler:
Collaboration diagram for QRhiSampler:

Public Types

enum  Filter { None , Nearest , Linear }
 Specifies the minification, magnification, or mipmap filtering. More...
enum  AddressMode { Repeat , ClampToEdge , Mirror }
 Specifies the addressing mode. More...
enum  CompareOp {
  Never , Less , Equal , LessOrEqual ,
  Greater , NotEqual , GreaterOrEqual , Always
}
 Specifies the texture comparison function. More...
Public Types inherited from QRhiResource
enum  Type {
  Buffer , Texture , Sampler , RenderBuffer ,
  RenderPassDescriptor , SwapChainRenderTarget , TextureRenderTarget , ShaderResourceBindings ,
  GraphicsPipeline , SwapChain , ComputePipeline , CommandBuffer ,
  ShadingRateMap
}
 Specifies type of the resource. More...

Public Member Functions

QRhiResource::Type resourceType () const override
Filter magFilter () const
void setMagFilter (Filter f)
 Sets the magnification filter mode to f.
Filter minFilter () const
void setMinFilter (Filter f)
 Sets the minification filter mode to f.
Filter mipmapMode () const
void setMipmapMode (Filter f)
 Sets the mipmap filter mode to f.
AddressMode addressU () const
void setAddressU (AddressMode mode)
 Sets the horizontal wrap mode.
AddressMode addressV () const
void setAddressV (AddressMode mode)
 Sets the vertical wrap mode.
AddressMode addressW () const
void setAddressW (AddressMode mode)
 Sets the depth wrap mode.
CompareOp textureCompareOp () const
void setTextureCompareOp (CompareOp op)
 Sets the texture comparison function op.
virtual bool create ()=0
Public Member Functions inherited from QRhiResource
virtual ~QRhiResource ()
 Destructor.
virtual void destroy ()=0
 Releases (or requests deferred releasing of) the underlying native graphics resources.
void deleteLater ()
 When called without a frame being recorded, this function is equivalent to deleting the object.
QByteArray name () const
void setName (const QByteArray &name)
 Sets a name for the object.
quint64 globalResourceId () const
QRhirhi () const

Protected Member Functions

 QRhiSampler (QRhiImplementation *rhi, Filter magFilter_, Filter minFilter_, Filter mipmapMode_, AddressMode u_, AddressMode v_, AddressMode w_)
Protected Member Functions inherited from QRhiResource
 QRhiResource (QRhiImplementation *rhi)

Protected Attributes

Filter m_magFilter
Filter m_minFilter
Filter m_mipmapMode
AddressMode m_addressU
AddressMode m_addressV
AddressMode m_addressW
CompareOp m_compareOp
Protected Attributes inherited from QRhiResource
QRhiImplementationm_rhi = nullptr
quint64 m_id
QByteArray m_objectName

Detailed Description

\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h

Since
6.6

Sampler resource.

Note
This is a RHI API with limited compatibility guarantees, see \l QRhi for details.

Definition at line 1052 of file qrhi.h.

Member Enumeration Documentation

◆ AddressMode

Specifies the addressing mode.

\value Repeat \value ClampToEdge \value Mirror

Enumerator
Repeat 
ClampToEdge 
Mirror 

Definition at line 1061 of file qrhi.h.

◆ CompareOp

Specifies the texture comparison function.

\value Never (default) \value Less \value Equal \value LessOrEqual \value Greater \value NotEqual \value GreaterOrEqual \value Always

Enumerator
Never 
Less 
Equal 
LessOrEqual 
Greater 
NotEqual 
GreaterOrEqual 
Always 

Definition at line 1067 of file qrhi.h.

◆ Filter

Specifies the minification, magnification, or mipmap filtering.

\value None Applicable only for mipmapMode(), indicates no mipmaps to be used \value Nearest \value Linear

Enumerator
None 
Nearest 
Linear 

Definition at line 1055 of file qrhi.h.

Constructor & Destructor Documentation

◆ QRhiSampler()

QRhiSampler::QRhiSampler ( QRhiImplementation * rhi,
Filter magFilter_,
Filter minFilter_,
Filter mipmapMode_,
AddressMode u_,
AddressMode v_,
AddressMode w_ )
protected

Definition at line 4927 of file qrhi.cpp.

Member Function Documentation

◆ addressU()

AddressMode QRhiSampler::addressU ( ) const
inline
Returns
the horizontal wrap mode.

Definition at line 1089 of file qrhi.h.

◆ addressV()

AddressMode QRhiSampler::addressV ( ) const
inline
Returns
the vertical wrap mode.

Definition at line 1092 of file qrhi.h.

◆ addressW()

AddressMode QRhiSampler::addressW ( ) const
inline
Returns
the depth wrap mode.

Definition at line 1095 of file qrhi.h.

◆ create()

virtual bool QRhiSampler::create ( )
pure virtual

◆ magFilter()

Filter QRhiSampler::magFilter ( ) const
inline
Returns
the magnification filter mode.

Definition at line 1080 of file qrhi.h.

◆ minFilter()

Filter QRhiSampler::minFilter ( ) const
inline
Returns
the minification filter mode.

Definition at line 1083 of file qrhi.h.

◆ mipmapMode()

Filter QRhiSampler::mipmapMode ( ) const
inline
Returns
the mipmap filter mode.

Definition at line 1086 of file qrhi.h.

◆ resourceType()

QRhiResource::Type QRhiSampler::resourceType ( ) const
overridevirtual
Returns
the resource type.

Implements QRhiResource.

Definition at line 4940 of file qrhi.cpp.

◆ setAddressU()

void QRhiSampler::setAddressU ( AddressMode mode)
inline

Sets the horizontal wrap mode.

Definition at line 1090 of file qrhi.h.

◆ setAddressV()

void QRhiSampler::setAddressV ( AddressMode mode)
inline

Sets the vertical wrap mode.

Definition at line 1093 of file qrhi.h.

◆ setAddressW()

void QRhiSampler::setAddressW ( AddressMode mode)
inline

Sets the depth wrap mode.

Definition at line 1096 of file qrhi.h.

◆ setMagFilter()

void QRhiSampler::setMagFilter ( Filter f)
inline

Sets the magnification filter mode to f.

Definition at line 1081 of file qrhi.h.

◆ setMinFilter()

void QRhiSampler::setMinFilter ( Filter f)
inline

Sets the minification filter mode to f.

Definition at line 1084 of file qrhi.h.

◆ setMipmapMode()

void QRhiSampler::setMipmapMode ( Filter f)
inline

Sets the mipmap filter mode to f.

Leave this set to None when the texture has no mip levels, or when the mip levels are not to be taken into account.

Definition at line 1087 of file qrhi.h.

◆ setTextureCompareOp()

void QRhiSampler::setTextureCompareOp ( CompareOp op)
inline

Sets the texture comparison function op.

Definition at line 1099 of file qrhi.h.

◆ textureCompareOp()

CompareOp QRhiSampler::textureCompareOp ( ) const
inline
Returns
the texture comparison function.

Definition at line 1098 of file qrhi.h.

Member Data Documentation

◆ m_addressU

AddressMode QRhiSampler::m_addressU
protected

Definition at line 1110 of file qrhi.h.

◆ m_addressV

AddressMode QRhiSampler::m_addressV
protected

Definition at line 1111 of file qrhi.h.

◆ m_addressW

AddressMode QRhiSampler::m_addressW
protected

Definition at line 1112 of file qrhi.h.

◆ m_compareOp

CompareOp QRhiSampler::m_compareOp
protected

Definition at line 1113 of file qrhi.h.

◆ m_magFilter

Filter QRhiSampler::m_magFilter
protected

Definition at line 1107 of file qrhi.h.

◆ m_minFilter

Filter QRhiSampler::m_minFilter
protected

Definition at line 1108 of file qrhi.h.

◆ m_mipmapMode

Filter QRhiSampler::m_mipmapMode
protected

Definition at line 1109 of file qrhi.h.


The documentation for this class was generated from the following files: