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
QD3D11Sampler Struct Reference

#include <qrhid3d11_p.h>

+ Inheritance diagram for QD3D11Sampler:
+ Collaboration diagram for QD3D11Sampler:

Public Member Functions

 QD3D11Sampler (QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w)
 
 ~QD3D11Sampler ()
 
void destroy () override
 Releases (or requests deferred releasing of) the underlying native graphics resources.
 
bool create () override
 
- Public Member Functions inherited from QRhiSampler
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.
 
- Public Member Functions inherited from QRhiResource
virtual ~QRhiResource ()
 Destructor.
 
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
 

Public Attributes

ID3D11SamplerState * samplerState = nullptr
 
uint generation = 0
 

Friends

class QRhiD3D11
 

Additional Inherited Members

- Public Types inherited from QRhiSampler
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...
 
- Protected Member Functions inherited from QRhiSampler
 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 inherited from QRhiSampler
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

Definition at line 104 of file qrhid3d11_p.h.

Constructor & Destructor Documentation

◆ QD3D11Sampler()

QD3D11Sampler::QD3D11Sampler ( QRhiImplementation * rhi,
Filter magFilter,
Filter minFilter,
Filter mipmapMode,
AddressMode u,
AddressMode v,
AddressMode w )

Definition at line 3598 of file qrhid3d11.cpp.

◆ ~QD3D11Sampler()

QD3D11Sampler::~QD3D11Sampler ( )

Definition at line 3604 of file qrhid3d11.cpp.

References destroy().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

bool QD3D11Sampler::create ( )
overridevirtual

Implements QRhiSampler.

Definition at line 3694 of file qrhid3d11.cpp.

References destroy(), generation, QRhiSampler::m_addressU, QRhiSampler::m_addressV, QRhiSampler::m_addressW, QRhiSampler::m_compareOp, QRhiSampler::m_magFilter, QRhiSampler::m_minFilter, QRhiSampler::m_mipmapMode, QRhiSampler::Never, QRhiSampler::None, qPrintable, QRHI_RES_RHI, qWarning, samplerState, toD3DAddressMode(), toD3DFilter(), and toD3DTextureComparisonFunc().

+ Here is the call graph for this function:

◆ destroy()

void QD3D11Sampler::destroy ( )
overridevirtual

Releases (or requests deferred releasing of) the underlying native graphics resources.

Safe to call multiple times, subsequent invocations will be a no-op then.

Once destroy() is called, the QRhiResource instance can be reused, by calling create() again. That will then result in creating new native graphics resources underneath.

Note
Resources referenced by commands for the current frame should not be released until the frame is submitted by QRhi::endFrame().

The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.

See also
deleteLater()

Implements QRhiResource.

Definition at line 3609 of file qrhid3d11.cpp.

References QRHI_RES_RHI, and samplerState.

Referenced by ~QD3D11Sampler(), and create().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QRhiD3D11

friend class QRhiD3D11
friend

Definition at line 114 of file qrhid3d11_p.h.

Member Data Documentation

◆ generation

uint QD3D11Sampler::generation = 0

Definition at line 113 of file qrhid3d11_p.h.

Referenced by create().

◆ samplerState

ID3D11SamplerState* QD3D11Sampler::samplerState = nullptr

Definition at line 112 of file qrhid3d11_p.h.

Referenced by create(), and destroy().


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