Qt 6.x
The Qt SDK
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
4#include "qqnxglcontext.h"
5#include "qqnxintegration.h"
6#include "qqnxscreen.h"
7#include "qqnxeglwindow.h"
8
9#include "private/qeglconvenience_p.h"
10
11#include <QtCore/QDebug>
12#include <QtGui/QOpenGLContext>
13#include <QtGui/QScreen>
14
15#include <dlfcn.h>
16
17#if defined(QQNXGLCONTEXT_DEBUG)
18#define qGLContextDebug qDebug
19#else
20#define qGLContextDebug QT_NO_QDEBUG_MACRO
21#endif
22
24
25static QEGLPlatformContext::Flags makeFlags()
26{
27 QEGLPlatformContext::Flags result = {};
28
31
32 return result;
33}
34
36 : QEGLPlatformContext(format, share, QQnxIntegration::instance()->eglDisplay(), nullptr,
37 makeFlags())
38{
39}
40
42{
43}
44
46{
47 QQnxEglWindow *window = static_cast<QQnxEglWindow *>(surface);
48 window->ensureInitialized(this);
49 return window->surface();
50}
51
53{
56}
57
59{
61
63
64 QQnxEglWindow *platformWindow = static_cast<QQnxEglWindow*>(surface);
65 platformWindow->windowPosted();
66}
67
69{
71}
72
An EGL context implementation.
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
bool makeCurrent(QPlatformSurface *surface) override
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
The QPlatformSurface class provides an abstraction for a surface.
void doneCurrent() override
bool makeCurrent(QPlatformSurface *surface) override
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override
virtual ~QQnxGLContext()
QQnxGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share)
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
static QQnxIntegration * instance()
void windowPosted()
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
Combined button and popup list for selecting options.
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
GLint GLsizei GLsizei GLenum format
GLuint64EXT * result
[6]
#define qGLContextDebug
static QT_BEGIN_NAMESPACE QEGLPlatformContext::Flags makeFlags()
bool testFlag(MaskType mask, FlagType flag)
QObject::connect nullptr
aWidget window() -> setWindowTitle("New Window Title")
[2]