diff options
author | Adam Treat <adam.treat@qt.io> | 2017-12-02 10:36:12 -0500 |
---|---|---|
committer | Adam Treat <adam.treat@qt.io> | 2018-02-08 01:28:41 +0000 |
commit | 36171af399e24095a0836e05a519a19e161a278e (patch) | |
tree | f44d3d4e981267a3d24a9238f197481f3f079dcb /src/plugins/platforms/qnx/qqnxglcontext.h | |
parent | ce8e72d04012620d8243bfa38db087b5194b68c4 (diff) |
Make use of our egl convenience code for QNX QPA
This fixes various problems that occur because the current egl context
assumes OpenGL ES 2.0 and does not support newer versions of ES.
Task-number: QTBUG-64306
Change-Id: I81466ba5cf028b47ca5a2ebcdc702167aff655a2
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxglcontext.h')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxglcontext.h | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.h b/src/plugins/platforms/qnx/qqnxglcontext.h index 6e5408e8bf..19179a80e2 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.h +++ b/src/plugins/platforms/qnx/qqnxglcontext.h @@ -46,49 +46,31 @@ #include <QtCore/QSize> #include <EGL/egl.h> +#include <QtEglSupport/private/qeglplatformcontext_p.h> QT_BEGIN_NAMESPACE class QQnxWindow; -class QQnxGLContext : public QPlatformOpenGLContext +class QQnxGLContext : public QEGLPlatformContext { public: - QQnxGLContext(QOpenGLContext *glContext); + QQnxGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share); virtual ~QQnxGLContext(); - static EGLenum checkEGLError(const char *msg); - static void initializeContext(); static void shutdownContext(); - void requestSurfaceChange(); - bool makeCurrent(QPlatformSurface *surface) override; - void doneCurrent() override; void swapBuffers(QPlatformSurface *surface) override; - QFunctionPointer getProcAddress(const char *procName) override; - - virtual QSurfaceFormat format() const override { return m_windowFormat; } - bool isSharing() const override; + void doneCurrent() override; - static EGLDisplay getEglDisplay(); - EGLConfig getEglConfig() const { return m_eglConfig;} - EGLContext getEglContext() const { return m_eglContext; } +protected: + EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override; private: //Can be static because different displays returne the same handle static EGLDisplay ms_eglDisplay; - - QSurfaceFormat m_windowFormat; - QOpenGLContext *m_glContext; - - EGLConfig m_eglConfig; - EGLContext m_eglContext; - EGLContext m_eglShareContext; - EGLSurface m_currentEglSurface; - - static EGLint *contextAttrs(const QSurfaceFormat &format); }; QT_END_NAMESPACE |