[Qt-interest] QGLContext error

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Fri Jan 9 13:23:54 CET 2009


ami guru wrote on Friday, January 09, 2009 1:10 PM:

> ...
> Whenever i try to render to pixmap i get the following error:
> ...
> QGLContext::makeCurrent(): Failed.
> ...
> Any hint to get around that ?

Try upgrading the OpenGL driver maybe? It's sad to say, but mostly on Linux it is the driver's fault, especially for newer cards where the driver has not gone through an extensive testing phase yet (read: not too many customers have complained about it so far and the ones who are actually using it can be happy that there exists one at all ;)

That said, you could also give a recent Qt 4.5 snapshot a try - I understand they improved the OpenGL there, too. When it comes to rendering QImages onto a QGLWidget, for example, making better use of OpenGL extensions (I see a *dramatic* perfomance boost on my WinXP laptop with some nVidia graphic card when rendering a "non-power-of-two" pixmap, for example :) - but I doubt that has anything to do with the problem you are observing. Still, it's worth a try.

You could also try another OpenGL application which renders offscreen into a pixmap. Note though that if it works it *still* does not imply that it is Qt's fault, because there are *several* ways in OpenGL to render to a pixmap!. But if it fails there as well it would be a clear indication that it is indeed the driver's fault.

Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22




More information about the Qt-interest-old mailing list