diff -r 41300fa6a67c -r 3b1da2848fc7 src/opengl/qglpixelbuffer_win.cpp --- a/src/opengl/qglpixelbuffer_win.cpp Tue Feb 02 00:43:10 2010 +0200 +++ b/src/opengl/qglpixelbuffer_win.cpp Fri Feb 19 23:40:16 2010 +0200 @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -221,7 +221,7 @@ } if ((f.redBufferSize() > 8 || f.greenBufferSize() > 8 || f.blueBufferSize() > 8 || f.alphaBufferSize() > 8) - && (QGLExtensions::glExtensions & QGLExtensions::NVFloatBuffer)) + && (QGLExtensions::glExtensions() & QGLExtensions::NVFloatBuffer)) { attribs[i++] = WGL_FLOAT_COMPONENTS_NV; attribs[i++] = TRUE; @@ -368,11 +368,9 @@ bool QGLPixelBuffer::hasOpenGLPbuffers() { bool ret = false; - QGLWidget *dmy = 0; - if (!QGLContext::currentContext()) { - dmy = new QGLWidget; - dmy->makeCurrent(); - } + QGLTemporaryContext *tmpContext = 0; + if (!QGLContext::currentContext()) + tmpContext = new QGLTemporaryContext; PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB"); if (wglGetExtensionsStringARB) { @@ -382,8 +380,8 @@ ret = true; } } - if (dmy) - delete dmy; + if (tmpContext) + delete tmpContext; return ret; }