Describes a texture-to-texture copy operation. More...
| Header: | #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 |
| 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 |
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.
Note: The source texture must be created with QRhiTexture::UsedAsTransferSource.
Note: The source and destination rectangles defined by pixelSize(), sourceTopLeft(), and 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.
Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.
[constexpr noexcept] QRhiTextureCopyDescription::QRhiTextureCopyDescription()Constructs an empty texture copy description.
Returns the destination array layer (cubemap face or array layer index). Default to 0.
See also setDestinationLayer().
Returns the destionation mip level. Defaults to 0.
See also setDestinationLevel().
Returns the destionation top-left position in pixels. Defaults to (0, 0).
See also setDestinationTopLeft().
Returns the size of the region to copy.
Note: 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.
See also setPixelSize().
Sets the destination array layer.
See also destinationLayer().
Sets the destination mip level.
See also destinationLevel().
Sets the destination top-left position p.
See also destinationTopLeft().
Sets the size of the region to copy to sz.
See also pixelSize().
Sets the source array layer.
See also sourceLayer().
Sets the source mip level.
See also sourceLevel().
Sets the source top-left position to p.
See also sourceTopLeft().
Returns the source array layer (cubemap face or array layer index). Defaults to 0.
See also setSourceLayer().
Returns the source mip level. Defaults to 0.
See also setSourceLevel().
Returns the source top-left position (in pixels). Defaults to (0, 0).
See also setSourceTopLeft().