summaryrefslogtreecommitdiffstats
path: root/src/platformheaders/nativecontexts/qeglnativecontext.qdoc
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-06-08 20:00:36 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-02 10:27:50 +0200
commit6ff79478a44fce12ca18832a56db4a370a9ff417 (patch)
tree2bcd7ab7bac46fe28e0828e0a704649bbc025e8f /src/platformheaders/nativecontexts/qeglnativecontext.qdoc
parent037dce81fc27ec241edb6829f6df41927b80666e (diff)
Introduce platform API abstraction for QOpenGLContext
The API is available by including qopenglcontext.h as usual, but scoped in the QPlatformInterface namespace. The namespace exposes platform specific type-safe interfaces that provide: a) Factory functions for adopting native contexts, e.g. QCocoaGLContext::fromNative(nsContext, shareContext); b) Access to underlying native handles, e.g. openGLContext->platformInterface<QCocoaGLContext>->nativeContext() c) Platform specific functionality, e.g. static QWGLContext::openGLModuleHandle() openGLContext->platformInterface<QEGLContext>->doSomething(); The platform interfaces live close to the classes they extend, removing the need for complex indirection and plumbing, and avoids kitchen-sink modules and APIs such as the extras modules, QPlatformFunctions, or QPlatformNativeInterface. In the case of QOpenGLContext these platform APIs are backed by the platform plugin, so dynamic_cast is used to ensure the platform plugin supports the requested interface, but this is and implementation detail. The interface APIs are agnostic to where the implementation lives, while still being available to the user as part of the APIs they extend/augment. The documentation will be restored when the dust settles. Task-number: QTBUG-80233 Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/platformheaders/nativecontexts/qeglnativecontext.qdoc')
-rw-r--r--src/platformheaders/nativecontexts/qeglnativecontext.qdoc70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/platformheaders/nativecontexts/qeglnativecontext.qdoc b/src/platformheaders/nativecontexts/qeglnativecontext.qdoc
deleted file mode 100644
index 3779ea10c8..0000000000
--- a/src/platformheaders/nativecontexts/qeglnativecontext.qdoc
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \class QEGLNativeContext
- \inmodule QtPlatformHeaders
- \since 5.4
-
- \brief A class encapsulating an EGL context and display handle.
-
- \note There is no binary compatibility guarantee for this class, meaning
- that an application using it is only guaranteed to work with the Qt version it was
- developed against.
-
- \note Due to being public while relying on otherwise hidden EGL types, this header
- itself does not include \c{EGL/egl.h}. It is the application's responsibility to
- include egl.h with any appropriate defines (for example, \c{MESA_EGL_NO_X11_HEADERS}
- or other vendor-specific defines controlling the typedefs for EGL's native resources)
- before this header.
-
- \sa QOpenGLContext::setNativeHandle(), QOpenGLContext::nativeHandle()
- */
-
-/*!
- \fn EGLContext QEGLNativeContext::context() const
-
- \return the EGL context.
- */
-
-/*!
- \fn EGLDisplay QEGLNativeContext::display() const
-
- \return the EGL display.
- */
-
-/*!
- \fn QEGLNativeContext::QEGLNativeContext()
-
- Construct a new instance with no handles.
- */
-
-/*!
- \fn QEGLNativeContext::QEGLNativeContext(EGLContext ctx, EGLDisplay dpy)
-
- Constructs a new instance with the provided \a ctx and \a dpy handles.
- */