Unsolved QRenderCaptureReply returns a screenshot with a background and no model
-
auto camSelector = this->defaultFrameGraph()->findChild<Qt3DRender::QCamera*>(); m_cap = new Qt3DRender::QRenderCapture(camSelector); connect(this, &Q3DShowWindow::signalGetImage,[&](){ QEventLoop loop; auto reply = m_cap->requestCapture(); qDebug()<<"wait for m_returnimage finish"; connect(reply, &Qt3DRender::QRenderCaptureReply::completed, [&] { m_returnImage = reply->image(); qDebug()<<"ok in loop"; reply->deleteLater(); loop.quit(); }); loop.exec(); });
Above is a screenshot of a scene I used QRenderCaptureReply to get, but m_ReturnImage only gets the background of the scene.
Why is that? Did I miss something? -
Hi,
Please do not post the same question in multiple sub-forum. One is enough.
Closing this one.