QRhiReadbackResult Struct

Describes the results of a potentially asynchronous buffer or texture readback operation. More...

Header: #include <QRhiReadbackResult>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 6.6

Public Variables

std::function<void ()> completed
QByteArray data
QRhiTexture::Format format
QSize pixelSize

Detailed Description

When completed is set, the function is invoked when the data is available. format and pixelSize are set upon completion together with data.

Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.

Member Variable Documentation

std::function<void ()> QRhiReadbackResult::completed

Callback that is invoked upon completion, on the thread the QRhi operates on. Can be left set to nullptr, in which case no callback is invoked.

QByteArray QRhiReadbackResult::data

The buffer or image data.

See also QRhiResourceUpdateBatch::readBackTexture() and QRhiResourceUpdateBatch::readBackBuffer().

QRhiTexture::Format QRhiReadbackResult::format

Valid only for textures, the texture format.

QSize QRhiReadbackResult::pixelSize

Valid only for textures, the size in pixels.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.