PySide6.QtGui.QRhiTextureCopyDescription¶
- class QRhiTextureCopyDescription¶
Describes a texture-to-texture copy operation.
Details
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
UsedAsTransferSource.Note
The source and destination rectangles defined by
pixelSize(),sourceTopLeft(), anddestinationTopLeft()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
QRhifor details.Added in version 6.6.
Synopsis¶
Methods¶
def
__init__()def
pixelSize()def
setPixelSize()def
setSourceLayer()def
setSourceLevel()def
sourceLayer()def
sourceLevel()def
sourceTopLeft()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__()¶
Constructs an empty texture copy description.
- destinationLayer()¶
- Return type:
int
Returns the destination array layer (cubemap face or array layer index). Default to 0.
See also
- destinationLevel()¶
- Return type:
int
Returns the destionation mip level. Defaults to 0.
See also
Returns the destionation top-left position in pixels. Defaults to (0, 0).
See also
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
- setDestinationLayer(layer)¶
- Parameters:
layer – int
Sets the destination array
layer.See also
- setDestinationLevel(level)¶
- Parameters:
level – int
Sets the destination mip
level.See also
Sets the destination top-left position
p.See also
Sets the size of the region to copy to
sz.See also
- setSourceLayer(layer)¶
- Parameters:
layer – int
Sets the source array
layer.See also
- setSourceLevel(level)¶
- Parameters:
level – int
Sets the source mip
level.See also
Sets the source top-left position to
p.See also
- sourceLayer()¶
- Return type:
int
Returns the source array layer (cubemap face or array layer index). Defaults to 0.
See also
- sourceLevel()¶
- Return type:
int
Returns the source mip level. Defaults to 0.
See also
Returns the source top-left position (in pixels). Defaults to (0, 0).
See also