VR-Engage  2.2
Loading...
Searching...
No Matches
vreQtQRenderControl.h
Go to the documentation of this file.
1/*********************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*********************************************************************************/
5
6//! \file vreQtQRenderControl.h
7//! \ingroup vreQtQuickRenderer
8//! \brief Extended QQuickRenderControl for integrating with VREngage
9//!
10//! This class extends the default QQuickRenderControl to provide control over
11//! synchronization and rendering timing within the VREngage environment. It enables
12//! proper integration between Qt Quick and OSG rendering pipelines.
13
14#pragma once
15
17
18#include <QtQuick/QQuickRenderControl>
19
20namespace makVre
21{
22//! \brief Extended rendering control for Qt Quick in VREngage
23//!
24//! This class extends QQuickRenderControl to provide control over when
25//! Qt Quick scenes are synchronized and rendered. It also manages the
26//! association with a window for rendering.
27class QTQUICKRENDERER_DLL DtQtQRenderControl : public QQuickRenderControl
28{
29public:
30 //! \brief Constructor
31 //! \param p Parent QObject
32 //! \param w Associated window for rendering
33 DtQtQRenderControl(QObject* p, QWindow* w);
34
35 //! \brief Virtual destructor
36 virtual ~DtQtQRenderControl() override;
37
38 //! \brief Returns the window being rendered to
39 //! \param offset Output parameter for window offset
40 //! \return Pointer to the window being rendered to
41 virtual QWindow* renderWindow(QPoint* offset) Q_DECL_OVERRIDE;
42
43 //! \brief Gets the associated window
44 //! \return Pointer to the associated window
45 QWindow* getWindow();
46
47 //! \brief Sets the associated window
48 //! \param window Pointer to the window to associate with this control
49 void setWindow(QWindow* window);
50
51 //! \brief Checks if rendering is needed
52 //! \return True if rendering is needed, false otherwise
54
55 //! \brief Sets whether rendering is needed
56 //! \param needed True if rendering is needed, false otherwise
57 void setNeedsRender(bool needed);
58
59 //! \brief Checks if polish and sync operations are needed
60 //! \return True if polish and sync are needed, false otherwise
62
63 //! \brief Sets whether polish and sync operations are needed
64 //! \param needed True if polish and sync are needed, false otherwise
65 void setNeedsPolishAndSync(bool needed);
66
67protected:
68 //! \brief Pointer to the associated window
69 QWindow* myWindow;
70
71 //! \brief Flag indicating if rendering is needed
73 //! \brief Flag indicating if polish and sync operations are needed
75};
76} // namespace makVre
virtual ~DtQtQRenderControl() override
Virtual destructor.
QWindow * myWindow
Pointer to the associated window.
Definition vreQtQRenderControl.h:69
void setWindow(QWindow *window)
Sets the associated window.
DtQtQRenderControl(QObject *p, QWindow *w)
Constructor.
bool getNeedsPolishAndSync()
Checks if polish and sync operations are needed.
bool myNeedsRender
Flag indicating if rendering is needed.
Definition vreQtQRenderControl.h:72
void setNeedsPolishAndSync(bool needed)
Sets whether polish and sync operations are needed.
bool myNeedsPolishAndSync
Flag indicating if polish and sync operations are needed.
Definition vreQtQRenderControl.h:74
virtual QWindow * renderWindow(QPoint *offset) Q_DECL_OVERRIDE
Returns the window being rendered to.
bool getNeedsRender()
Checks if rendering is needed.
void setNeedsRender(bool needed)
Sets whether rendering is needed.
QWindow * getWindow()
Gets the associated window.
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