From 08c2368911d0e992d66db5a043a96c6a66ec8893 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Wed, 9 Nov 2011 17:49:54 +0100 Subject: Fix build when QEGL_EXTRA_DEBUG is defined for debug output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also shift EGL configuration plot above window surface creation Change-Id: I2de860e087cb2648b6e8e9b75365fbe78fe7687a Reviewed-by: Samuel Rødal --- src/plugins/platforms/eglfs/qeglfsscreen.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp index bae2c05ef1..4f83e3a5ad 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp @@ -115,9 +115,7 @@ QEglFSScreen::QEglFSScreen(EGLNativeDisplayType display) #endif EGLint major, minor; -#ifdef QEGL_EXTRA_DEBUG - EGLint index; -#endif + if (!eglBindAPI(EGL_OPENGL_ES_API)) { qWarning("Could not bind GL_ES API\n"); qFatal("EGL error"); @@ -188,26 +186,28 @@ void QEglFSScreen::createAndSetPlatformContext() kdRealizeWindow(window,&eglWindow); #endif - m_surface = eglCreateWindowSurface(m_dpy, config, eglWindow, NULL); - if (m_surface == EGL_NO_SURFACE) { - qWarning("Could not create the egl surface: error = 0x%x\n", eglGetError()); - eglTerminate(m_dpy); - qFatal("EGL error"); - } - // qWarning("Created surface %dx%d\n", w, h); - #ifdef QEGL_EXTRA_DEBUG qWarning("Configuration %d matches requirements\n", (int)config); + EGLint index; for (index = 0; attrs[index].attr != -1; ++index) { EGLint value; if (eglGetConfigAttrib(m_dpy, config, attrs[index].attr, &value)) { qWarning("\t%s: %d\n", attrs[index].name, (int)value); } } + qWarning("\n"); #endif + m_surface = eglCreateWindowSurface(m_dpy, config, eglWindow, NULL); + if (m_surface == EGL_NO_SURFACE) { + qWarning("Could not create the egl surface: error = 0x%x\n", eglGetError()); + eglTerminate(m_dpy); + qFatal("EGL error"); + } + // qWarning("Created surface %dx%d\n", w, h); + QEGLPlatformContext *platformContext = new QEglFSContext(platformFormat, 0, m_dpy); m_platformContext = platformContext; -- cgit v1.2.3