QRhiReadbackResult Struct

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

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

公共变量

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

详细描述

completed is set, the function is invoked when the data 可用。 format and pixelSize are set upon completion together with data .

注意: This is a RHI API with limited compatibility guarantees, see QRhi 了解细节。

成员变量文档编制

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.

另请参阅 QRhiResourceUpdateBatch::readBackTexture () 和 QRhiResourceUpdateBatch::readBackBuffer ().

QRhiTexture::Format QRhiReadbackResult:: format

Valid only for textures, the texture format.

QSize QRhiReadbackResult:: pixelSize

Valid only for textures, the size in pixels.