Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qopenglwindow.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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QOPENGLWINDOW_H
6
#
define
QOPENGLWINDOW_H
7
8
#
include
<
QtOpenGL
/
qtopenglglobal
.
h
>
9
10
#
ifndef
QT_NO_OPENGL
11
12
#
include
<
QtGui
/
QPaintDeviceWindow
>
13
#
include
<
QtGui
/
QOpenGLContext
>
14
#
include
<
QtGui
/
QImage
>
15
16
QT_BEGIN_NAMESPACE
17
18
class
QOpenGLWindowPrivate;
19
20
class
Q_OPENGL_EXPORT
QOpenGLWindow
:
public
QPaintDeviceWindow
21
{
22
Q_OBJECT
23
Q_DECLARE_PRIVATE(QOpenGLWindow)
24
25
public
:
26
enum
UpdateBehavior {
27
NoPartialUpdate,
28
PartialUpdateBlit,
29
PartialUpdateBlend
30
};
31
32
explicit
QOpenGLWindow(UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent =
nullptr
);
33
explicit
QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior = NoPartialUpdate, QWindow *parent =
nullptr
);
34
~QOpenGLWindow();
35
36
UpdateBehavior updateBehavior()
const
;
37
bool
isValid()
const
;
38
39
void
makeCurrent();
40
void
doneCurrent();
41
42
QOpenGLContext *context()
const
;
43
QOpenGLContext *shareContext()
const
;
44
45
GLuint defaultFramebufferObject()
const
;
46
47
QImage grabFramebuffer();
48
49
Q_SIGNALS:
50
void
frameSwapped();
51
52
protected
:
53
virtual
void
initializeGL();
54
virtual
void
resizeGL(
int
w,
int
h);
55
virtual
void
paintGL();
56
virtual
void
paintUnderGL();
57
virtual
void
paintOverGL();
58
59
void
paintEvent(QPaintEvent *event) override;
60
void
resizeEvent(QResizeEvent *event) override;
61
int
metric(PaintDeviceMetric metric)
const
override;
62
QPaintDevice *redirected(QPoint *)
const
override;
63
64
private
:
65
Q_DISABLE_COPY(QOpenGLWindow)
66
};
67
68
QT_END_NAMESPACE
69
70
#
endif
// QT_NO_OPENGL
71
72
#
endif
QOpenGLWindowPaintDevice
Definition
qopenglwindow.cpp:151
QOpenGLWindowPaintDevice::m_window
QOpenGLWindow * m_window
Definition
qopenglwindow.cpp:156
QOpenGLWindowPaintDevice::QOpenGLWindowPaintDevice
QOpenGLWindowPaintDevice(QOpenGLWindow *window)
Definition
qopenglwindow.cpp:153
QOpenGLWindowPaintDevice::ensureActiveTarget
void ensureActiveTarget() override
This virtual method is provided as a callback to allow re-binding a target frame buffer object or con...
Definition
qopenglwindow.cpp:328
QOpenGLWindowPrivate
Definition
qopenglwindow.cpp:160
QOpenGLWindowPrivate::fbo
QScopedPointer< QOpenGLFramebufferObject > fbo
Definition
qopenglwindow.cpp:187
QOpenGLWindowPrivate::hasFboBlit
bool hasFboBlit
Definition
qopenglwindow.cpp:184
QOpenGLWindowPrivate::context
QScopedPointer< QOpenGLContext > context
Definition
qopenglwindow.cpp:185
QOpenGLWindowPrivate::blitter
QOpenGLTextureBlitter blitter
Definition
qopenglwindow.cpp:189
QOpenGLWindowPrivate::paintDevice
QScopedPointer< QOpenGLWindowPaintDevice > paintDevice
Definition
qopenglwindow.cpp:188
QOpenGLWindowPrivate::initialize
void initialize()
Definition
qopenglwindow.cpp:198
QOpenGLWindowPrivate::endPaint
void endPaint() override
Definition
qopenglwindow.cpp:272
QOpenGLWindowPrivate::get
static QOpenGLWindowPrivate * get(QOpenGLWindow *w)
Definition
qopenglwindow.cpp:174
QOpenGLWindowPrivate::bindFBO
void bindFBO()
Definition
qopenglwindow.cpp:312
QOpenGLWindowPrivate::backgroundColor
QColor backgroundColor
Definition
qopenglwindow.cpp:190
QOpenGLWindowPrivate::offscreenSurface
QScopedPointer< QOffscreenSurface > offscreenSurface
Definition
qopenglwindow.cpp:191
QOpenGLWindowPrivate::flush
void flush(const QRegion ®ion) override
Definition
qopenglwindow.cpp:320
QOpenGLWindowPrivate::shareContext
QOpenGLContext * shareContext
Definition
qopenglwindow.cpp:186
QOpenGLWindowPrivate::beginPaint
void beginPaint(const QRegion ®ion) override
Definition
qopenglwindow.cpp:230
QOpenGLWindow
\inmodule QtOpenGL
Definition
qopenglwindow.h:21
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
GL_DRAW_FRAMEBUFFER
#define GL_DRAW_FRAMEBUFFER
Definition
qopenglext.h:1024
GL_READ_FRAMEBUFFER
#define GL_READ_FRAMEBUFFER
Definition
qopenglext.h:1023
qtbase
src
opengl
qopenglwindow.h
Generated on
for Qt by
1.18.0