QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCRhiCapture.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4#include <QtCore/QString>
5#include <QtCore/qglobal.h>
6#include <atomic>
7
8class QRhi;
9class QQuickWindow;
10
12namespace QGCRhiCapture {
13
15QRhi* cachedRhi() noexcept;
16
20{
21 std::atomic<int> backend{-1};
22 std::atomic<void*> d3d11Device{nullptr};
23 std::atomic<void*> d3d12Device{nullptr};
24 std::atomic<qint64> adapterLuid{0};
25 std::atomic<void*> vkPhysicalDevice{nullptr};
26 std::atomic<quint32> vkQueueFamilyIdx{0};
27 std::atomic<quint32> vkQueueIdx{0};
28 std::atomic<int> framesInFlight{0};
29};
30
32DeviceSnapshot& deviceSnapshot() noexcept;
33
36void connectWindow(QQuickWindow* window);
37
38} // namespace QGCRhiCapture
Resolves and caches the QRhi* driving QGC's main scene graph; Qt has no global RHI accessor.
QRhi * cachedRhi() noexcept
Cached QRhi* maintained by sceneGraph signals; safe from any thread via acquire ordering.
void connectWindow(QQuickWindow *window)
DeviceSnapshot & deviceSnapshot() noexcept
Returns the global snapshot. Atomic fields make individual reads thread-safe.