summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxeglwindow.h
diff options
context:
space:
mode:
authorAdam Treat <adam.treat@qt.io>2017-12-02 10:36:12 -0500
committerAdam Treat <adam.treat@qt.io>2018-02-08 01:28:41 +0000
commit36171af399e24095a0836e05a519a19e161a278e (patch)
treef44d3d4e981267a3d24a9238f197481f3f079dcb /src/plugins/platforms/qnx/qqnxeglwindow.h
parentce8e72d04012620d8243bfa38db087b5194b68c4 (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/qqnxeglwindow.h')
-rw-r--r--src/plugins/platforms/qnx/qqnxeglwindow.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.h b/src/plugins/platforms/qnx/qqnxeglwindow.h
index 183be11ddc..3a3840f13c 100644
--- a/src/plugins/platforms/qnx/qqnxeglwindow.h
+++ b/src/plugins/platforms/qnx/qqnxeglwindow.h
@@ -53,13 +53,10 @@ public:
QQnxEglWindow(QWindow *window, screen_context_t context, bool needRootWindow);
~QQnxEglWindow();
- void createEGLSurface();
- void destroyEGLSurface();
- void swapEGLBuffers();
- EGLSurface getSurface();
+ EGLSurface surface() const;
- void setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext);
- QQnxGLContext *platformOpenGLContext() const { return m_platformOpenGLContext; }
+ bool isInitialized() const;
+ void ensureInitialized(QQnxGLContext *context);
void setGeometry(const QRect &rect) override;
@@ -68,6 +65,9 @@ protected:
void resetBuffers() override;
private:
+ void createEGLSurface(QQnxGLContext *context);
+ void destroyEGLSurface();
+
QSize m_requestedBufferSize;
// This mutex is used to protect access to the m_requestedBufferSize
@@ -78,9 +78,11 @@ private:
// QQnxGLContext::makeCurrent()
mutable QMutex m_mutex;
- QQnxGLContext *m_platformOpenGLContext;
QAtomicInt m_newSurfaceRequested;
+ EGLDisplay m_eglDisplay;
+ EGLConfig m_eglConfig;
EGLSurface m_eglSurface;
+ QSurfaceFormat m_format;
};
QT_END_NAMESPACE