Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickrendercontrol.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKRENDERCONTROL_H
5#define QQUICKRENDERCONTROL_H
6
7#include <QtCore/qobject.h>
8#include <QtQuick/qtquickglobal.h>
9#include <QtGui/qimage.h>
10
12
13class QQuickWindow;
14class QOpenGLContext;
16class QThread;
17class QRhi;
19
20class Q_QUICK_EXPORT QQuickRenderControl : public QObject
21{
23
24public:
25 explicit QQuickRenderControl(QObject *parent = nullptr);
26 ~QQuickRenderControl() override;
27
28 void prepareThread(QThread *targetThread);
29
30 void setSamples(int sampleCount);
31 int samples() const;
32
33 bool initialize();
34
35 void invalidate();
36
37 void beginFrame();
38 void endFrame();
39
40 void polishItems();
41 bool sync();
42 void render();
43
44 static QWindow *renderWindowFor(QQuickWindow *win, QPoint *offset = nullptr);
45 virtual QWindow *renderWindow(QPoint *offset) { Q_UNUSED(offset); return nullptr; }
46
47 QQuickWindow *window() const;
48
49 QRhi *rhi() const;
50 QRhiCommandBuffer *commandBuffer() const;
51
52protected:
53 explicit QQuickRenderControl(QQuickRenderControlPrivate &dd, QObject *parent = nullptr);
54
58
59private:
60 Q_DECLARE_PRIVATE(QQuickRenderControl)
61};
62
64
65#endif // QQUICKRENDERCONTROL_H
\inmodule QtCore
Definition qobject.h:103
\inmodule QtGui
\inmodule QtCore\reentrant
Definition qpoint.h:25
The QQuickRenderControl class provides a mechanism for rendering the Qt Quick scenegraph onto an offs...
virtual QWindow * renderWindow(QPoint *offset)
Reimplemented in subclasses to return the real window this render control is rendering into.
void renderRequested()
This signal is emitted when the scene graph needs to be rendered.
void sceneChanged()
This signal is emitted when the scene graph is updated, meaning that polishItems() and sync() needs t...
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtGui
Definition qrhi.h:1651
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:1804
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
static bool initialize()
Definition qctf.cpp:94
GLsizei samples
GLenum GLuint GLintptr offset
#define Q_OBJECT
#define Q_SIGNALS
#define Q_UNUSED(x)
QWidget * win
Definition settings.cpp:6
aWidget window() -> setWindowTitle("New Window Title")
[2]
myWidget render(this)