VR-Engage  2.2
Loading...
Searching...
No Matches
vreQtQuickRendererDrawable.h
Go to the documentation of this file.
1/*********************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*********************************************************************************/
5
6#pragma once
7
8//! \file vreQtQuickRendererDrawable.h
9//! \ingroup vreQtQuickRenderer
10//! \brief OSG drawable for rendering QML content into the scene graph
11//!
12//! This class implements the OSG drawable interface to integrate Qt Quick
13//! rendering into the OSG scene graph. It handles the drawing of QML content
14//! during the OSG rendering process, providing the bridge between Qt Quick
15//! and OSG rendering pipelines.
16
18
19#include <osg/Drawable>
20
21namespace makVre
22{
24
25//! \brief OSG drawable for rendering Qt Quick content
26//!
27//! This class implements the OSG drawable interface for rendering Qt Quick content.
28//! It manages the connection to the Qt Quick renderer and handles the drawing of
29//! QML content during the OSG rendering process, either to the screen or to a texture.
31{
32public:
33 //! \brief Default constructor
34 //! \param renderer Pointer to the Qt Quick renderer
35 //! \param rttMode True if this drawable is for render-to-texture, false otherwise
36 DtQtQuickRendererDrawable(DtQtQuickRenderer* renderer = nullptr, bool rttMode = false);
37
38 //! \brief Copy constructor
39 //! \param reticle The drawable to copy
40 //! \param copyop Copy operation mode
42 const DtQtQuickRendererDrawable& reticle, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
43
44 //! \brief Virtual destructor
45 virtual ~DtQtQuickRendererDrawable() override;
46
47 //! OSG meta object declaration
49
50 //! \brief Implements the OSG drawing operation
51 //! \param renderInfo Render information from OSG
52 //!
53 //! This method is called by OSG during the rendering process to draw
54 //! the Qt Quick content into the scene
55 virtual void drawImplementation(osg::RenderInfo& renderInfo) const override;
56
57 //! \brief Sets the Qt Quick renderer
58 //! \param r Pointer to the Qt Quick renderer
60
61 //! \brief Gets the Qt Quick renderer
62 //! \return Pointer to the Qt Quick renderer
64
65 //! \brief Sets whether this is a render-to-texture drawable
66 //! \param isRTT True if this is a render-to-texture drawable, false otherwise
67 virtual void setRTTDrawable(bool isRTT);
68
69 //! \brief Checks if this is a render-to-texture drawable
70 //! \return True if this is a render-to-texture drawable, false otherwise
71 virtual bool getRTTDrawable();
72
73protected:
74 //! \brief Pointer to the Qt Quick renderer
76 //! \brief Flag indicating if this is a render-to-texture drawable
78};
79} // namespace makVre
META_Object(test, DtQtQuickRendererDrawable)
OSG meta object declaration.
DtQtQuickRendererDrawable(DtQtQuickRenderer *renderer=nullptr, bool rttMode=false)
Default constructor.
bool myRTTDrawable
Flag indicating if this is a render-to-texture drawable.
Definition vreQtQuickRendererDrawable.h:77
virtual ~DtQtQuickRendererDrawable() override
Virtual destructor.
DtQtQuickRenderer * myRenderer
Pointer to the Qt Quick renderer.
Definition vreQtQuickRendererDrawable.h:75
virtual void setRenderer(DtQtQuickRenderer *r)
Sets the Qt Quick renderer.
virtual void setRTTDrawable(bool isRTT)
Sets whether this is a render-to-texture drawable.
virtual void drawImplementation(osg::RenderInfo &renderInfo) const override
Implements the OSG drawing operation.
DtQtQuickRendererDrawable(const DtQtQuickRendererDrawable &reticle, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Copy constructor.
virtual DtQtQuickRenderer * getRenderer()
Gets the Qt Quick renderer.
virtual bool getRTTDrawable()
Checks if this is a render-to-texture drawable.
Core renderer for QML content in the VREngage environment.
Definition DtQtQuickRenderer.h:60
Defines export macros for the VREngage Qt Quick Renderer library.
#define QTQUICKRENDERER_DLL
Export/import macro for non-Windows platforms.
Definition export.h:40
Include export definitions for this library.
Definition glsVreMessageUtil.h:49