87 QRhiTexture::Format format)
89 std::unique_ptr<QRhiTexture> texture(
90 rhi.newTexture(format, planeSize, 1, QRhiTexture::UsedAsTransferSource));
91 if (!texture->createFrom(QRhiTexture::NativeTexture{ handle, 0 }))
92 return q23::unexpected(u"QRhiTexture::createFrom failed"_s);
94 QRhiResourceUpdateBatch *batch = rhi.nextResourceUpdateBatch();
95 QRhiReadbackResult result;
96 batch->readBackTexture(texture.get(), &result);
98 QRhiCommandBuffer *cb =
nullptr;
99 if (rhi.beginOffscreenFrame(&cb) != QRhi::FrameOpSuccess || !cb)
100 return q23::unexpected(u"QRhi::beginOffscreenFrame failed"_s);
101 cb->resourceUpdate(batch);
102 rhi.endOffscreenFrame();
192 -1.f, -1.f, 0.f, 1.f, 0.f, 0.f,
193 1.f, -1.f, 0.f, 1.f, 1.f, 0.f,
194 -1.f, 1.f, 0.f, 1.f, 0.f, 1.f,
195 1.f, 1.f, 0.f, 1.f, 1.f, 1.f,