From e1774d202912b5d053872f242c61d964a5d69450 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 29 May 2012 15:23:25 +0200 Subject: Verify the surfaceType before activating the GL context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verify that the surfaceType() of the QPlatformContext is of type OpenGLSurface before making the context active. Make it possible to get the QSurface from a QPlatformSurface, make QPlatformWindow use that to access the QWindow. Remove the setSurfaceType call from the eglfs plugin as this hiding a problem. Change-Id: I08906da052e066bb1f1f042030643c6389ab17d7 Reviewed-by: Samuel Rødal Reviewed-by: Girish Ramakrishnan --- src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/platformsupport/eglconvenience') diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp index d8ee996215..2e7baa0e1d 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp @@ -71,6 +71,8 @@ QEGLPlatformContext::QEGLPlatformContext(const QSurfaceFormat &format, QPlatform bool QEGLPlatformContext::makeCurrent(QPlatformSurface *surface) { + Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface); + #ifdef QEGL_EXTRA_DEBUG qWarning("QEglContext::makeCurrent: %p\n",this); #endif -- cgit v1.2.3