Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qandroidplatformopenglcontext.cpp
Go to the documentation of this file.
1// Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
9
10#include <QtGui/private/qeglpbuffer_p.h>
11
12#include <QSurface>
13#include <QtGui/private/qopenglcontext_p.h>
14#include <QtGui/QOffscreenSurface>
15
17
22
32
37
39{
40 if (surface->surface()->surfaceClass() == QSurface::Window) {
41 return static_cast<QAndroidPlatformOpenGLWindow *>(surface)->eglSurface(eglConfig());
42 } else {
43 if (auto *platformOffscreenSurface = dynamic_cast<QAndroidPlatformOffscreenSurface *>(surface))
44 return platformOffscreenSurface->surface();
45 else
46 return static_cast<QEGLPbuffer *>(surface)->pbuffer();
47 }
48}
49
bool makeCurrent(QPlatformSurface *surface) override
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
QAndroidPlatformOpenGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
A pbuffer-based implementation of QPlatformOffscreenSurface for EGL.
An EGL context implementation.
EGLConfig eglConfig() const
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.
QSurface * surface() const
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
SurfaceClass surfaceClass() const
Returns the surface class of this surface.
Definition qsurface.cpp:121
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
GLint GLsizei GLsizei GLenum format
QObject::connect nullptr