On certain machines running Windows, with Nvidia cards, our OpenGL code experienced intermittent freezes. That is, once in a while at irregular intervals, everything (including the mouse cursor) would freeze for maybe 3 to 8 seconds. We couldn’t reproduce it on a PC with an ATI card, nor on a Mac with an Nvidia card.
The problematic area of the code looked like this:
glPushAttrib( GL_LINE_BIT ); glLineWidth( myWidth ); DrawSomeLines(); glPopAttrib();
After changing it to the following, the problem went away:
glLineWidth( myWidth ); DrawSomeLines(); glLineWidth( 1.0f );
And if I did this, the problem came back:
glPushAttrib( GL_LINE_BIT ); glPopAttrib(); glLineWidth( myWidth ); DrawSomeLines(); glLineWidth( 1.0f );
Any of this ring any bells?