Sampler resource. 更多...
| 頭: |
#include <rhi/qrhi.h>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
|
| qmake: |
QT += gui-private
|
| Since: | Qt 6.6 |
| 繼承: | QRhiResource |
| enum | AddressMode { Repeat, ClampToEdge, Mirror } |
| enum | CompareOp { Never, Less, Equal, LessOrEqual, Greater, …, Always } |
| enum | Filter { None, Nearest, Linear } |
| 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 |
| virtual QRhiResource::Type | resourceType () const override |
注意: This is a RHI API with limited compatibility guarantees, see QRhi 瞭解細節。
Specifies the addressing mode
| 常量 | 值 |
|---|---|
QRhiSampler::Repeat
|
0
|
QRhiSampler::ClampToEdge
|
1
|
QRhiSampler::Mirror
|
2
|
Specifies the texture comparison function.
| 常量 | 值 | 描述 |
|---|---|---|
QRhiSampler::Never
|
0
|
(默認) |
QRhiSampler::Less
|
1
|
|
QRhiSampler::Equal
|
2
|
|
QRhiSampler::LessOrEqual
|
3
|
|
QRhiSampler::Greater
|
4
|
|
QRhiSampler::NotEqual
|
5
|
|
QRhiSampler::GreaterOrEqual
|
6
|
|
QRhiSampler::Always
|
7
|
Specifies the minification, magnification, or mipmap filtering
| 常量 | 值 | 描述 |
|---|---|---|
QRhiSampler::None
|
0
|
Applicable only for mipmapMode (), indicates no mipmaps to be used |
QRhiSampler::Nearest
|
1
|
|
QRhiSampler::Linear
|
2
|
Returns the horizontal wrap mode.
另請參閱 setAddressU ().
Returns the vertical wrap mode.
另請參閱 setAddressV ().
Returns the depth wrap mode.
另請參閱 setAddressW ().
Returns the magnification filter mode.
另請參閱 setMagFilter ().
Returns the minification filter mode.
另請參閱 setMinFilter ().
Returns the mipmap filter mode.
另請參閱 setMipmapMode ().
[override virtual]
QRhiResource::Type
QRhiSampler::
resourceType
() const
重實現: QRhiResource::resourceType () const.
Returns the resource type.
Sets the horizontal wrap mode .
另請參閱 addressU ().
Sets the vertical wrap mode .
另請參閱 addressV ().
Sets the depth wrap mode .
另請參閱 addressW ().
Sets the magnification filter mode to f .
另請參閱 magFilter ().
Sets the minification filter mode to f .
另請參閱 minFilter ().
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.
另請參閱 mipmapMode ().
Sets the texture comparison function op .
另請參閱 textureCompareOp ().
Returns the texture comparison function.
另請參閱 setTextureCompareOp ().