20#include <vrvUtil/DtSignalConnectionManager.h>
22#include <vrvOsg/DtImguiDrawable.h>
25#include <osg/Texture2D>
43class DtGlRenderTexture;
84 QObject* owner,
const std::string& filepath,
const std::function<
void(QQuickItem*)>& file_loaded_func);
91 virtual void loadQMLFile(QObject* owner,
const std::string& windowName,
const std::string& filepath,
92 const std::function<
void(QQuickItem*)>& file_loaded_func);
103 virtual void loadQMLFileRTT(QObject* owner,
const std::string& filepath, osg::Texture2D* target,
104 const std::function<
void(QQuickItem*)>& func);
130 virtual makVrv::DtDe&
de() {
return myDe; }
161 static QObject*
getChildObject(
const QObject* parent,
const QString& objectName);
Container for per-window Qt Quick rendering data.
Definition vrePerWindowQtQuickData.h:41
Extended QQuickWindow for VREngage integration.
Definition vreQQuickWindow.h:29
Extended rendering control for Qt Quick in VREngage.
Definition vreQtQRenderControl.h:28
Container for QML file rendering data.
Definition vreQtQuickFileData.h:36
osg::ref_ptr< osg::Drawable > myDrawable
Standard OSG drawable for Qt Quick rendering.
Definition DtQtQuickRenderer.h:229
static void install(makVrv::DtDe &de)
Installs the Qt Quick renderer system.
std::map< std::string, bool > myQmlDebugMap
Debug map for QML event debugging.
Definition DtQtQuickRenderer.h:256
virtual const int numberOfUIsToLoad() const
Gets the number of UIs that are in queue to load.
makVrv::DtSignalConnectionManager myConnections
Signal connection manager for Qt signals.
Definition DtQtQuickRenderer.h:250
std::vector< DtQtQuickFileData * > myUIsLoadedList
List of UIs that have been loaded.
Definition DtQtQuickRenderer.h:247
virtual void closeUIByRoot(QQuickItem *root)
Closes the UI associated with the specified root item.
virtual void setDebugConfig()
Sets up the debug configuration.
virtual osg::Geode * geodeRtt()
Gets the render-to-texture geode.
virtual void reloadQMLFile(DtQtQuickFileData *data)
Reloads a QML file from file data.
friend class DtQtQuickRendererDrawable
Friends that need access to protected members.
Definition DtQtQuickRenderer.h:170
virtual void onWindowToBeDestroyed(makVrv::DtWindow *win)
Handles a window being destroyed.
virtual void addToDebugMap(const std::string &logCat)
Adds a category to the debug map.
QQmlEngine * myQmlEngine
QML engine for loading and rendering QML.
Definition DtQtQuickRenderer.h:237
virtual makVrv::DtDe & de()
Gets the graphics engine reference.
Definition DtQtQuickRenderer.h:130
virtual void loadQMLFile(QObject *owner, const std::string &filepath, const std::function< void(QQuickItem *)> &file_loaded_func)
Loads a QML file and calls a function when loaded.
virtual void updateQuick(osg::RenderInfo &renderInfo)
Updates the Qt Quick rendering in OSG.
virtual ~DtQtQuickRenderer()
Virtual destructor.
friend class DtQQuickWindow
Definition DtQtQuickRenderer.h:171
virtual void reloadQMLFile(QObject *owner)
Reloads the QML file associated with the specified owner.
DtQtQuickRenderer(makVrv::DtDe &de)
Constructor for Qt Quick renderer.
virtual void slot_vrRunningChanged(bool running)
Slot called when VR running state changes.
static DtQtQuickRenderer * theQtQuickRenderer
Singleton instance of the Qt Quick renderer.
Definition DtQtQuickRenderer.h:221
virtual QQuickItem * loadFileNow(osg::GraphicsContext *gc, DtQtQuickFileData *fileData)
Loads a QML file immediately.
osg::ref_ptr< osg::Geode > myGeode
Standard OSG geode for Qt Quick rendering.
Definition DtQtQuickRenderer.h:227
makVrv::DtDe & myDe
Reference to the graphics engine.
Definition DtQtQuickRenderer.h:224
virtual void debugManagerCallback()
Callback for debug manager.
virtual const QRect & getWindowDimensions(const std::string &windowName) const
Gets the dimensions of the specified window.
RenderControlMap myRenderControlMap
Map of graphics contexts to Qt Quick data.
Definition DtQtQuickRenderer.h:242
static DtQtQuickRenderer * instance()
Gets the singleton Qt Quick renderer instance.
osg::ref_ptr< osg::Drawable > myDrawableRTT
Render-to-texture OSG drawable.
Definition DtQtQuickRenderer.h:234
virtual void shutdown()
Cleans up and shuts down the Qt Quick renderer system.
virtual void slot_vrOverlayChanged()
Slot called when VR overlay settings change.
virtual void loadQMLFile(QObject *owner, const std::string &windowName, const std::string &filepath, const std::function< void(QQuickItem *)> &file_loaded_func)
Loads a QML file to a specific window and calls a function when loaded.
osg::GraphicsContext * myDefaultContext
Default graphics context.
Definition DtQtQuickRenderer.h:240
osg::ref_ptr< osg::Geode > myGeodeRTT
Render-to-texture OSG geode.
Definition DtQtQuickRenderer.h:232
std::vector< DtQtQuickFileData * > myUIsToLoadList
List of UIs waiting to be loaded.
Definition DtQtQuickRenderer.h:245
std::map< osg::GraphicsContext *, DtPerWindowQtQuickData * > RenderControlMap
Type definition for mapping graphics contexts to Qt Quick data.
Definition DtQtQuickRenderer.h:63
osg::Texture2D * myRenderTargetToSync
Texture to synchronize for VR rendering.
Definition DtQtQuickRenderer.h:253
static QObject * getChildObject(const QObject *parent, const QString &objectName)
Gets a reference to a child QObject in QML.
virtual void loadQMLFileRTT(QObject *owner, const std::string &filepath, osg::Texture2D *target, const std::function< void(QQuickItem *)> &func)
Loads a QML file for render-to-texture and calls a function when loaded.
virtual QQmlContext * rootContext()
Gets the root QML context.
virtual void syncVirtualRealityRenderTarget(unsigned int ctxid)
Synchronizes the virtual reality render target with all file data.
virtual void closeUIByOwner(QObject *owner)
Closes the UI associated with the specified owner.
virtual DtPerWindowQtQuickData * getWindowData(osg::GraphicsContext *gc)
Gets Qt Quick data for the specified graphics context.
virtual void installDefaultProperties()
Installs default properties for all root QML objects.
virtual void setVirtualRealityRenderTarget(osg::Texture2D *texture)
Sets the virtual reality render target.
virtual void closeUI(DtQtQuickFileData *data)
Closes a UI from file data.
virtual void initQtQuickRenderingComponents(osg::RenderInfo &renderInfo)
Initializes Qt Quick rendering components.
Defines export macros for the VREngage Qt Quick Renderer library.
#define QTQUICKRENDERER_DLL
Export/import macro for non-Windows platforms.
Definition export.h:40
Provides configuration initialization for VREngage components.
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Definition appLauncherComponent.h:28