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() , 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.

Added in version 6.6.

Synopsis

Methods

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.

destinationLevel()
Return type:

int

Returns the destionation mip level. Defaults to 0.

destinationTopLeft()
Return type:

QPoint

Returns the destionation top-left position in pixels. Defaults to (0, 0).

pixelSize()
Return type:

QSize

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()

setDestinationLayer(layer)
Parameters:

layer – int

Sets the destination array layer.

setDestinationLevel(level)
Parameters:

level – int

Sets the destination mip level.

setDestinationTopLeft(p)
Parameters:

pQPoint

Sets the destination top-left position p.

setPixelSize(sz)
Parameters:

szQSize

Sets the size of the region to copy to sz.

See also

pixelSize()

setSourceLayer(layer)
Parameters:

layer – int

Sets the source array layer.

See also

sourceLayer()

setSourceLevel(level)
Parameters:

level – int

Sets the source mip level.

See also

sourceLevel()

setSourceTopLeft(p)
Parameters:

pQPoint

Sets the source top-left position to p.

See also

sourceTopLeft()

sourceLayer()
Return type:

int

Returns the source array layer (cubemap face or array layer index). Defaults to 0.

See also

setSourceLayer()

sourceLevel()
Return type:

int

Returns the source mip level. Defaults to 0.

See also

setSourceLevel()

sourceTopLeft()
Return type:

QPoint

Returns the source top-left position (in pixels). Defaults to (0, 0).