Publishes the native device of the QRhi driving QGC's main scene graph; Qt has no global RHI accessor. More...
Classes | |
| struct | DeviceSnapshot |
Functions | |
| DeviceSnapshot & | deviceSnapshot () noexcept |
| Returns the global snapshot. Atomic fields make individual reads thread-safe. | |
| void * | qtEglDisplay () |
| void | setPublishedHandler (void(*handler)()) noexcept |
| void | connectWindow (QQuickWindow *window) |
Publishes the native device of the QRhi driving QGC's main scene graph; Qt has no global RHI accessor.
| void QGCRhiCapture::connectWindow | ( | QQuickWindow * | window | ) |
Call once from the GUI thread once the main QQuickWindow exists; wires sceneGraph signals to maintain the device snapshot.
Definition at line 239 of file QGCRhiCapture.cc.
Referenced by HwBuffers::connectMainWindow().
|
noexcept |
Returns the global snapshot. Atomic fields make individual reads thread-safe.
Definition at line 199 of file QGCRhiCapture.cc.
Referenced by GstQgc::currentRenderTarget(), HwBuffers::d3d11OpensD3D12(), HwBuffers::dmaBufImportDisplay(), and HwBuffers::graphicsAdapterLuid().
| void * QGCRhiCapture::qtEglDisplay | ( | ) |
The EGLDisplay (as void*) Qt's OpenGL renders with; null when Qt's OpenGL doesn't run on EGL (GLX, WGL, CGL, no OpenGL) or that isn't known yet. Taken from Qt's global share context, else from the platform integration (asked on the GUI thread only), else from the scene graph's OpenGL context once it runs. Any thread.
Definition at line 211 of file QGCRhiCapture.cc.
References qGuiApp.
Referenced by GstQgc::currentRenderTarget(), and HwBuffers::dmaBufImportDisplay().
|
noexcept |
Has handler called after each publication of a device in deviceSnapshot(), on the thread that publishes it (the render thread); null for none.
Definition at line 234 of file QGCRhiCapture.cc.
Referenced by HwBuffers::setGraphicsDevicePublishedHandler().