[osg-users] SetPixelFormat failure with Win XP and Nvidia

0 views
Skip to first unread message

Robin Ledig

unread,
Feb 1, 2010, 12:52:48 PM2/1/10
to osg-...@lists.openscenegraph.org
Hi,

I got a complex implementation which should work platform independent.
My problem is that I get an unknown Pixelformat error ( Windows error
[2000] ) when I try to set the Pixel format with Qt.
I have already had a look at Don Leich's implementation which works on
the same configuration but I'm unable to determine the difference.
It's Win xp with an nvidia graphics card.
With debugging I found that my implementation choices the same pixel
format as Don's but still gets the error.
I also found other's who had the same problem with google or here in the
mailing list but I couldn't find a concrete answer.
I would appreciate any help and would post some code snippets if necessary.

Robin
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robin Ledig

unread,
Feb 10, 2010, 3:04:03 PM2/10/10
to osg-...@lists.openscenegraph.org
It took me a while but I finaly found the solution.
Though I couldn't find anything on google I post it here so that it will
hopefully help someone who encounters this problem.
The source of the problem is that the Viewer Class which initializes the
OpenGL Graphics Context is derived from QGLWidget.
Which for itself sets the Pixelformat. This is only a Problem for the
combination of Windows and NVidia cards with all the driver Versions I
tested.
The SetPixelFormat crashes because it can be called only once for each
device context.
So the solution is to derive only from QWidget instead of QGLWidget.

Cheers,

Reply all
Reply to author
Forward
0 new messages