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
qqnxglcontext.cpp
Go to the documentation of this file.
1
// Copyright (C) 2011 - 2013 BlackBerry Limited. All rights reserved.
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
#
include
"qqnxglcontext.h"
6
#
include
"qqnxintegration.h"
7
#
include
"qqnxscreen.h"
8
#
include
"qqnxeglwindow.h"
9
#
include
"qqnxwindow.h"
10
11
#
include
"private/qeglconvenience_p.h"
12
13
#
include
<
QtCore
/
QDebug
>
14
#
include
<
QtGui
/
QOpenGLContext
>
15
#
include
<
QtGui
/
QScreen
>
16
17
#
include
<
dlfcn
.
h
>
18
19
QT_BEGIN_NAMESPACE
20
21
Q_LOGGING_CATEGORY
(lcQpaGLContext,
"qt.qpa.glcontext"
);
22
23
static
QEGLPlatformContext
::
Flags
makeFlags
()
24
{
25
QEGLPlatformContext::Flags result = {};
26
27
if
(!
QQnxIntegration
::
instance
(
)
->options().testFlag(
QQnxIntegration
::
SurfacelessEGLContext
))
28
result |= QEGLPlatformContext::NoSurfaceless;
29
30
return
result;
31
}
32
33
QQnxGLContext
::
QQnxGLContext
(
const
QSurfaceFormat &format, QPlatformOpenGLContext *share)
34
:
QEGLPlatformContext
(
format
,
share
,
QQnxIntegration
::
instance
()->
eglDisplay
(),
nullptr
,
35
makeFlags
())
36
{
37
}
38
39
QQnxGLContext
::~
QQnxGLContext
()
40
{
41
}
42
43
EGLSurface
QQnxGLContext
::
eglSurfaceForPlatformSurface
(QPlatformSurface *surface)
44
{
45
QQnxEglWindow
*window =
static_cast
<
QQnxEglWindow
*>(surface);
46
window
->
ensureInitialized
(
this
)
;
47
return
window
->
surface
(
)
;
48
}
49
50
bool
QQnxGLContext
::
makeCurrent
(QPlatformSurface *surface)
51
{
52
qCDebug(lcQpaGLContext) << Q_FUNC_INFO;
53
return
QEGLPlatformContext::makeCurrent(surface);
54
}
55
56
void
QQnxGLContext
::
swapBuffers
(QPlatformSurface *surface)
57
{
58
qCDebug(lcQpaGLContext) << Q_FUNC_INFO;
59
60
QQnxEglWindow
*platformWindow =
static_cast
<
QQnxEglWindow
*>(surface);
61
platformWindow
->
windowPosted
();
62
QEGLPlatformContext::swapBuffers(surface);
63
}
64
65
void
QQnxGLContext
::
doneCurrent
()
66
{
67
QEGLPlatformContext::doneCurrent();
68
}
69
70
QT_END_NAMESPACE
QQnxEglWindow
Definition
qqnxeglwindow.h:19
QQnxEglWindow::surface
EGLSurface surface() const
Definition
qqnxeglwindow.cpp:124
QQnxEglWindow::ensureInitialized
void ensureInitialized(QQnxGLContext *context)
Definition
qqnxeglwindow.cpp:40
QQnxGLContext
Definition
qqnxglcontext.h:24
QQnxGLContext::doneCurrent
void doneCurrent() override
Definition
qqnxglcontext.cpp:65
QQnxGLContext::makeCurrent
bool makeCurrent(QPlatformSurface *surface) override
Definition
qqnxglcontext.cpp:50
QQnxGLContext::eglSurfaceForPlatformSurface
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override
Definition
qqnxglcontext.cpp:43
QQnxGLContext::~QQnxGLContext
virtual ~QQnxGLContext()
Definition
qqnxglcontext.cpp:39
QQnxGLContext::QQnxGLContext
QQnxGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share)
Definition
qqnxglcontext.cpp:33
QQnxGLContext::swapBuffers
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
Definition
qqnxglcontext.cpp:56
QQnxIntegration
Definition
qqnxintegration.h:47
QQnxIntegration::SurfacelessEGLContext
@ SurfacelessEGLContext
Definition
qqnxintegration.h:54
QQnxIntegration::instance
static QQnxIntegration * instance()
Definition
qqnxintegration.h:61
QQnxWindow::windowPosted
void windowPosted()
Definition
qqnxwindow.cpp:961
Q_LOGGING_CATEGORY
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
makeFlags
static QEGLPlatformContext::Flags makeFlags()
Definition
qqnxglcontext.cpp:23
qtbase
src
plugins
platforms
qnx
qqnxglcontext.cpp
Generated on
for Qt by
1.18.0