Describes a texture-to-texture copy operation. 更多...
头: | #include <QRhiTextureCopyDescription> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
Since: | Qt 6.6 |
QRhiTextureCopyDescription () | |
int | destinationLayer () const |
int | destinationLevel () const |
QPoint | destinationTopLeft () const |
QSize | pixelSize () const |
void | setDestinationLayer (int layer ) |
void | setDestinationLevel (int level ) |
void | setDestinationTopLeft (const QPoint & p ) |
void | setPixelSize (const QSize & sz ) |
void | setSourceLayer (int layer ) |
void | setSourceLevel (int level ) |
void | setSourceTopLeft (const QPoint & p ) |
int | sourceLayer () const |
int | sourceLevel () const |
QPoint | sourceTopLeft () const |
空 pixelSize () indicates that the entire subresource is to be copied. A default constructed copy description therefore leads to copying the entire subresource at level 0 of layer 0.
注意: The source texture must be created with QRhiTexture::UsedAsTransferSource .
注意: The source and destination rectangles defined by pixelSize (), sourceTopLeft (),和 destinationTopLeft () must fit the source and destination textures, respectively. The behavior is undefined otherwise.
With cubemaps, 3D textures, and texture arrays one face or slice can be copied at a time. The face or slice is specified by the source and destination layer indices. With mipmapped textures one mip level can be copied at a time. The source and destination layer and mip level indices can differ, but the size and position must be carefully controlled to avoid out of bounds copies, in which case the behavior is undefined.
注意: This is a RHI API with limited compatibility guarantees, see QRhi 了解细节。
[constexpr noexcept]
QRhiTextureCopyDescription::
QRhiTextureCopyDescription
()
Constructs an empty texture copy description.
Returns the destination array layer (cubemap face or array layer index). Default to 0.
另请参阅 setDestinationLayer ().
Returns the destionation mip level. Defaults to 0.
另请参阅 setDestinationLevel ().
Returns the destionation top-left position in pixels. Defaults to (0, 0).
另请参阅 setDestinationTopLeft ().
Returns the size of the region to copy.
注意: An empty pixelSize() indicates that the entire subresource is to be copied. A default constructed copy description therefore leads to copying the entire subresource at level 0 of layer 0.
另请参阅 setPixelSize ().
Sets the destination array layer .
另请参阅 destinationLayer ().
Sets the destination mip level .
另请参阅 destinationLevel ().
Sets the destination top-left position p .
另请参阅 destinationTopLeft ().
Sets the size of the region to copy to sz .
另请参阅 pixelSize ().
Sets the source array layer .
另请参阅 sourceLayer ().
Sets the source mip level .
另请参阅 sourceLevel ().
Sets the source top-left position to p .
另请参阅 sourceTopLeft ().
Returns the source array layer (cubemap face or array layer index). Defaults to 0.
另请参阅 setSourceLayer ().
Returns the source mip level. Defaults to 0.
另请参阅 setSourceLevel ().
Returns the source top-left position (in pixels). Defaults to (0, 0).
另请参阅 setSourceTopLeft ().