QRhiReadbackResult Struct

描述潜在异步缓冲区或纹理回读操作的结果。更多

头文件: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
Qt 6.6

公共变量

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

详细说明

completed 被设置时,函数将在data 可用时被调用。formatpixelSize 将在完成后与data 一起被设置。

注: 这是一个 RHI API,具有有限的兼容性保证,详见QRhi

成员变量文档

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

QRhi 上运行的线程完成后调用的回调。可将其设置为nullptr ,在这种情况下不会调用回调。

QByteArray QRhiReadbackResult::data

缓冲区或图像数据。

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

QRhiTexture::Format QRhiReadbackResult::format

仅对纹理有效,即纹理格式。

QSize QRhiReadbackResult::pixelSize

仅对纹理有效,尺寸单位为像素。

© 2025 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.