diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-01-26 18:33:02 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-01-26 19:40:45 +0000 |
commit | f3060312c89344744832e3352fe4f53efcb94c9b (patch) | |
tree | de69be5e25a1acd3207a8952376f634fe94fefcc /src/platformsupport/eglconvenience | |
parent | c29d3692d700f7ef6d5833242878b4ec6f81c928 (diff) | |
parent | a15c3d086dafea83e4760f0b447be43d26b80697 (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
Diffstat (limited to 'src/platformsupport/eglconvenience')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 7 | ||||
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformcontext_p.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp index d63f81a1d8..9e7298b89a 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp @@ -281,6 +281,12 @@ void QEGLPlatformContext::destroyTemporaryOffscreenSurface(EGLSurface surface) eglDestroySurface(m_eglDisplay, surface); } +void QEGLPlatformContext::runGLChecks() +{ + // Nothing to do here, subclasses may override in order to perform OpenGL + // queries needing a context. +} + void QEGLPlatformContext::updateFormatFromGL() { #ifndef QT_NO_OPENGL @@ -352,6 +358,7 @@ void QEGLPlatformContext::updateFormatFromGL() } } } + runGLChecks(); eglMakeCurrent(prevDisplay, prevSurfaceDraw, prevSurfaceRead, prevContext); } else { qWarning("QEGLPlatformContext: Failed to make temporary surface current, format not updated (%x)", eglGetError()); diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h index be7f5e9f3e..2679c3b9f8 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h +++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h @@ -90,6 +90,7 @@ protected: virtual EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) = 0; virtual EGLSurface createTemporaryOffscreenSurface(); virtual void destroyTemporaryOffscreenSurface(EGLSurface surface); + virtual void runGLChecks(); private: void init(const QSurfaceFormat &format, QPlatformOpenGLContext *share); |