Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandbrcmglcontext.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
4#ifndef QWAYLANDBRCMGLCONTEXT_H
5#define QWAYLANDBRCMGLCONTEXT_H
6
7#include <QtWaylandClient/private/qwaylanddisplay_p.h>
8
9#include <qpa/qplatformopenglcontext.h>
10
11#include <EGL/egl.h>
12
14
15namespace QtWaylandClient {
16
17class QWaylandWindow;
18
20public:
22 QWaylandBrcmGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
24
25 void swapBuffers(QPlatformSurface *surface) override;
26
27 bool makeCurrent(QPlatformSurface *surface) override;
28 void doneCurrent() override;
29
30 QFunctionPointer getProcAddress(const char *procName) override;
31
32 QSurfaceFormat format() const override { return m_format; }
33
34 EGLConfig eglConfig() const;
35 EGLContext eglContext() const { return m_context; }
36
37private:
38 EGLDisplay m_eglDisplay = EGL_NO_DISPLAY;
39
40 EGLContext m_context;
41 EGLConfig m_config;
42 QSurfaceFormat m_format;
43};
44
45}
46
47QT_END_NAMESPACE
48
49#endif // QWAYLANDBRCMGLCONTEXT_H
void * nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) override
QOpenGLContext * createOpenGLContext(EGLContext context, EGLDisplay contextDisplay, QOpenGLContext *shareContext) const override
void * nativeResource(NativeResource resource) override
QPlatformOpenGLContext * createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override
void initialize(QWaylandDisplay *waylandDisplay) override
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
QSurfaceFormat format() const override
Returns the actual surface format of the window.
QSurfaceFormat format() const override
void swapBuffers(QPlatformSurface *surface) override
Reimplement in subclass to native swap buffers calls.
bool makeCurrent(QPlatformSurface *surface) override
QWaylandBrcmGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share)
QFunctionPointer getProcAddress(const char *procName) override
Reimplement in subclass to allow dynamic querying of OpenGL symbols.