![]() |
Qt 6.x
The Qt SDK
|
#include <qrhivulkan_p.h>
Public Member Functions | |
QVkSampler (QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode, AddressMode u, AddressMode v, AddressMode w) | |
~QVkSampler () | |
void | destroy () override |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
bool | create () override |
![]() | |
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 |
![]() | |
virtual | ~QRhiResource () |
Destructor. | |
virtual Type | resourceType () const =0 |
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 |
QRhi * | rhi () const |
Public Attributes | |
VkSampler | sampler = VK_NULL_HANDLE |
int | lastActiveFrameSlot = -1 |
uint | generation = 0 |
Friends | |
class | QRhiVulkan |
Definition at line 132 of file qrhivulkan_p.h.
QVkSampler::QVkSampler | ( | QRhiImplementation * | rhi, |
Filter | magFilter, | ||
Filter | minFilter, | ||
Filter | mipmapMode, | ||
AddressMode | u, | ||
AddressMode | v, | ||
AddressMode | w | ||
) |
Definition at line 6396 of file qrhivulkan.cpp.
QVkSampler::~QVkSampler | ( | ) |
Definition at line 6402 of file qrhivulkan.cpp.
References destroy().
|
overridevirtual |
Implements QRhiSampler.
Definition at line 6426 of file qrhivulkan.cpp.
References destroy(), generation, lastActiveFrameSlot, 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, QRHI_RES_RHI, qWarning, toVkAddressMode(), toVkFilter(), toVkMipmapMode(), and toVkTextureCompareOp().
|
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.
The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.
Implements QRhiResource.
Definition at line 6407 of file qrhivulkan.cpp.
References e, lastActiveFrameSlot, QRHI_RES_RHI, sampler, and QRhiVulkan::DeferredReleaseEntry::Sampler.
Referenced by ~QVkSampler(), and create().
|
friend |
Definition at line 143 of file qrhivulkan_p.h.
uint QVkSampler::generation = 0 |
Definition at line 142 of file qrhivulkan_p.h.
Referenced by create(), QRhiVulkan::setShaderResources(), and QRhiVulkan::updateShaderResourceBindings().
int QVkSampler::lastActiveFrameSlot = -1 |
Definition at line 141 of file qrhivulkan_p.h.
Referenced by create(), destroy(), and QRhiVulkan::setShaderResources().
VkSampler QVkSampler::sampler = VK_NULL_HANDLE |
Definition at line 140 of file qrhivulkan_p.h.
Referenced by destroy(), QRhiVulkan::setShaderResources(), and QRhiVulkan::updateShaderResourceBindings().