18
18
#define UBUNTU_OPENGL_CONTEXT_H
20
20
#include <qpa/qplatformopenglcontext.h>
21
#include <private/qeglplatformcontext_p.h>
22
23
#include <EGL/egl.h>
24
class UbuntuOpenGLContext : public QPlatformOpenGLContext
25
class UbuntuOpenGLContext : public QEGLPlatformContext
27
UbuntuOpenGLContext(const QSurfaceFormat &surfaceFormat, UbuntuOpenGLContext *share,
28
EGLDisplay display, EGLConfig config);
29
virtual ~UbuntuOpenGLContext();
31
// QPlatformOpenGLContext methods.
32
QSurfaceFormat format() const override { return mSurfaceFormat; }
33
void swapBuffers(QPlatformSurface *surface) override;
34
bool makeCurrent(QPlatformSurface *surface) override;
35
void doneCurrent() override;
36
bool isValid() const override { return mEglContext != EGL_NO_CONTEXT; }
37
void (*getProcAddress(const QByteArray& procName)) () override;
39
EGLContext eglContext() const { return mEglContext; }
42
const QSurfaceFormat mSurfaceFormat;
43
EGLContext mEglContext;
44
EGLDisplay mEglDisplay;
28
UbuntuOpenGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share,
31
// QEGLPlatformContext methods.
32
void swapBuffers(QPlatformSurface *surface) final;
33
bool makeCurrent(QPlatformSurface *surface) final;
36
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) final;
47
39
#endif // UBUNTU_OPENGL_CONTEXT_H