QRhi software-rendering example
Unsolved
Qt 6
-
I am trying to find a working example where
QSGRendererInterface::Software
independent of any OpenGL requirement would work for offscreen rendering.m_renderControl = new QQuickRenderControl(); m_quickWindow = new QQuickWindow(m_renderControl); m_quickWindow->setGraphicsApi(QSGRendererInterface::Software); QImage qimage = QImage(1920, 1080, QImage::Format_ARGB32); QQuickRenderTarget renderTarget = QQuickRenderTarget::fromPaintDevice(&qimage); m_quickWindow->setRenderTarget(renderTarget); m_renderControl->beginFrame(); m_renderControl->render(); m_renderControl->endFrame();
I end up with:
QQuickRenderControl: No QRhi in beginFrame() QQuickRenderControl: No QRhi in endFrame()
-