Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QRhiSampler Class Referenceabstract

\inmodule QtGui 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
}
 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 QtGui

Since
6.6

Sampler resource.

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

Definition at line 1029 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 1038 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 1044 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 1032 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 4749 of file qrhi.cpp.

Member Function Documentation

◆ addressU()

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

Definition at line 1066 of file qrhi.h.

◆ addressV()

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

Definition at line 1069 of file qrhi.h.

◆ addressW()

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

Definition at line 1072 of file qrhi.h.

◆ create()

virtual bool QRhiSampler::create ( )
pure virtual

Implemented in QD3D11Sampler, QGles2Sampler, QMetalSampler, QNullSampler, and QVkSampler.

Referenced by QSSGRhiContext::sampler().

+ Here is the caller graph for this function:

◆ magFilter()

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

Definition at line 1057 of file qrhi.h.

◆ minFilter()

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

Definition at line 1060 of file qrhi.h.

◆ mipmapMode()

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

Definition at line 1063 of file qrhi.h.

◆ resourceType()

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

Implements QRhiResource.

Definition at line 4762 of file qrhi.cpp.

References QRhiResource::Sampler.

◆ setAddressU()

void QRhiSampler::setAddressU ( AddressMode mode)
inline

Sets the horizontal wrap mode.

Definition at line 1067 of file qrhi.h.

◆ setAddressV()

void QRhiSampler::setAddressV ( AddressMode mode)
inline

Sets the vertical wrap mode.

Definition at line 1070 of file qrhi.h.

◆ setAddressW()

void QRhiSampler::setAddressW ( AddressMode mode)
inline

Sets the depth wrap mode.

Definition at line 1073 of file qrhi.h.

◆ setMagFilter()

void QRhiSampler::setMagFilter ( Filter f)
inline

Sets the magnification filter mode to f.

Definition at line 1058 of file qrhi.h.

◆ setMinFilter()

void QRhiSampler::setMinFilter ( Filter f)
inline

Sets the minification filter mode to f.

Definition at line 1061 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 1064 of file qrhi.h.

◆ setTextureCompareOp()

void QRhiSampler::setTextureCompareOp ( CompareOp op)
inline

Sets the texture comparison function op.

Definition at line 1076 of file qrhi.h.

◆ textureCompareOp()

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

Definition at line 1075 of file qrhi.h.

Member Data Documentation

◆ m_addressU

AddressMode QRhiSampler::m_addressU
protected

◆ m_addressV

AddressMode QRhiSampler::m_addressV
protected

◆ m_addressW

AddressMode QRhiSampler::m_addressW
protected

◆ m_compareOp

CompareOp QRhiSampler::m_compareOp
protected

◆ m_magFilter

Filter QRhiSampler::m_magFilter
protected

◆ m_minFilter

Filter QRhiSampler::m_minFilter
protected

◆ m_mipmapMode

Filter QRhiSampler::m_mipmapMode
protected

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