Qt
6.x
The Qt SDK
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Symbols
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
Loading...
Searching...
No Matches
qopenglcompositor_p.h
Go to the documentation of this file.
1
// Copyright (C) 2020 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 QOPENGLCOMPOSITOR_H
5
#define QOPENGLCOMPOSITOR_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#include <QtOpenGL/qtopenglglobal.h>
19
20
#include <QtCore/QTimer>
21
#include <QtOpenGL/QOpenGLTextureBlitter>
22
#include <QtGui/QMatrix4x4>
23
#include <QtCore/private/qglobal_p.h>
24
25
QT_BEGIN_NAMESPACE
26
27
class
QOpenGLContext
;
28
class
QOpenGLFramebufferObject
;
29
class
QWindow
;
30
class
QPlatformTextureList
;
31
32
class
QOpenGLCompositorWindow
33
{
34
public
:
35
virtual
~QOpenGLCompositorWindow
() { }
36
virtual
QWindow
*
sourceWindow
()
const
= 0;
37
virtual
const
QPlatformTextureList
*
textures
()
const
= 0;
38
virtual
void
beginCompositing
() { }
39
virtual
void
endCompositing
() { }
40
};
41
42
class
Q_OPENGL_EXPORT
QOpenGLCompositor
:
public
QObject
43
{
44
Q_OBJECT
45
46
public
:
47
static
QOpenGLCompositor
*instance();
48
static
void
destroy();
49
50
void
setTargetWindow(
QWindow
*
window
,
const
QRect
&nativeTargetGeometry);
51
void
setTargetContext(
QOpenGLContext
*
context
);
52
void
setRotation(
int
degrees);
53
QOpenGLContext
*
context
()
const
{
return
m_context; }
54
QWindow
*
targetWindow
()
const
{
return
m_targetWindow; }
55
56
void
update();
57
QImage
grab();
58
59
QList<QOpenGLCompositorWindow *>
windows
()
const
{
return
m_windows; }
60
void
addWindow(
QOpenGLCompositorWindow
*
window
);
61
void
removeWindow(
QOpenGLCompositorWindow
*
window
);
62
void
moveToTop(
QOpenGLCompositorWindow
*
window
);
63
void
changeWindowIndex(
QOpenGLCompositorWindow
*
window
,
int
newIdx);
64
65
signals
:
66
void
topWindowChanged
(
QOpenGLCompositorWindow
*
window
);
67
68
private
slots
:
69
void
handleRenderAllRequest();
70
71
private
:
72
QOpenGLCompositor
();
73
~QOpenGLCompositor
();
74
75
void
renderAll(
QOpenGLFramebufferObject
*fbo);
76
void
render
(
QOpenGLCompositorWindow
*
window
);
77
void
ensureCorrectZOrder();
78
79
QOpenGLContext
*m_context;
80
QWindow
*m_targetWindow;
81
QRect
m_nativeTargetGeometry;
82
int
m_rotation;
83
QMatrix4x4
m_rotationMatrix;
84
QTimer
m_updateTimer;
85
QOpenGLTextureBlitter
m_blitter;
86
QList<QOpenGLCompositorWindow *>
m_windows;
87
};
88
89
QT_END_NAMESPACE
90
91
#endif
// QOPENGLCOMPOSITOR_H
QImage
\inmodule QtGui
Definition
qimage.h:37
QList
Definition
qlist.h:74
QMatrix4x4
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition
qmatrix4x4.h:25
QObject
\inmodule QtCore
Definition
qobject.h:90
QOpenGLCompositorWindow
Definition
qopenglcompositor_p.h:33
QOpenGLCompositorWindow::endCompositing
virtual void endCompositing()
Definition
qopenglcompositor_p.h:39
QOpenGLCompositorWindow::textures
virtual const QPlatformTextureList * textures() const =0
QOpenGLCompositorWindow::~QOpenGLCompositorWindow
virtual ~QOpenGLCompositorWindow()
Definition
qopenglcompositor_p.h:35
QOpenGLCompositorWindow::sourceWindow
virtual QWindow * sourceWindow() const =0
QOpenGLCompositorWindow::beginCompositing
virtual void beginCompositing()
Definition
qopenglcompositor_p.h:38
QOpenGLCompositor
A generic OpenGL-based compositor.
Definition
qopenglcompositor_p.h:43
QOpenGLCompositor::context
QOpenGLContext * context() const
Definition
qopenglcompositor_p.h:53
QOpenGLCompositor::windows
QList< QOpenGLCompositorWindow * > windows() const
Definition
qopenglcompositor_p.h:59
QOpenGLCompositor::targetWindow
QWindow * targetWindow() const
Definition
qopenglcompositor_p.h:54
QOpenGLCompositor::topWindowChanged
void topWindowChanged(QOpenGLCompositorWindow *window)
QOpenGLContext
\inmodule QtGui
Definition
qopenglcontext.h:67
QOpenGLFramebufferObject
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer object.
Definition
qopenglframebufferobject.h:31
QOpenGLTextureBlitter
The QOpenGLTextureBlitter class provides a convenient way to draw textured quads via OpenGL.
Definition
qopengltextureblitter.h:18
QPlatformTextureList
Definition
qplatformbackingstore.h:90
QRect
\inmodule QtCore\reentrant
Definition
qrect.h:30
QTimer
\inmodule QtCore
Definition
qtimer.h:20
QWindow
\inmodule QtGui
Definition
qwindow.h:63
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
context
static void * context
Definition
qandroidaudiosource.cpp:42
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:117
slots
#define slots
Definition
qtmetamacros.h:40
signals
#define signals
Definition
qtmetamacros.h:41
window
aWidget window() -> setWindowTitle("New Window Title")
[2]
render
myWidget render(this)
qtbase
src
opengl
qopenglcompositor_p.h
Generated by
1.9.7