QRhiReadbackDescription Class
Describes a readback (reading back texture contents from possibly GPU-only memory) operation. More...
Header: | #include <QRhiReadbackDescription> |
qmake: | QT += rhi |
Public Functions
QRhiReadbackDescription() | |
QRhiReadbackDescription(QRhiTexture *texture) | |
int | layer() const |
int | level() const |
void | setLayer(int layer) |
void | setLevel(int level) |
void | setTexture(QRhiTexture *tex) |
QRhiTexture * | texture() const |
Detailed Description
Describes a readback (reading back texture contents from possibly GPU-only memory) operation.
The source of the readback operation is either a QRhiTexture or the current backbuffer of the currently targeted QRhiSwapChain. When texture() is not set, the swapchain is used. Otherwise the specified QRhiTexture is treated as the source.
Note: Textures used in readbacks must be created with QRhiTexture::UsedAsTransferSource.
Note: Swapchains used in readbacks must be created with QRhiSwapChain::UsedAsTransferSource.
layer() and level() are only applicable when the source is a QRhiTexture.
Note: Multisample textures cannot be read back. Readbacks are supported for multisample swapchain buffers however.
Member Type Documentation
Property Documentation
Member Function Documentation
QRhiReadbackDescription::QRhiReadbackDescription()
Constructs an empty texture readback description.
Note: The source texture is set to null by default, which is still a valid readback: it specifies that the backbuffer of the current swapchain is to be read back. (current meaning the frame's target swapchain at the time of committing the QRhiResourceUpdateBatch with the texture readback on it)
QRhiReadbackDescription::QRhiReadbackDescription(QRhiTexture *texture)
Constructs an texture readback description that specifies that level 0 of layer 0 of texture is to be read back.
Note: texture can also be null in which case this constructor is identical to the argumentless variant.
int QRhiReadbackDescription::layer() const
See also setLayer().
int QRhiReadbackDescription::level() const
See also setLevel().
void QRhiReadbackDescription::setLayer(int layer)
See also layer().
void QRhiReadbackDescription::setLevel(int level)
See also level().
void QRhiReadbackDescription::setTexture(QRhiTexture *tex)
See also texture().
QRhiTexture *QRhiReadbackDescription::texture() const
See also setTexture().