[PyOpenGL-Users] bug+fix: multiple Opengl widget repaint causing stack underflow
Brought to you by:
mcfletch
From: Maciej K. <ma...@dg...> - 2001-12-03 21:35:31
|
In PyOpengl 2.0.0.44, Tk/__init__.py, proposed patch: *** __init__.py.orig Sun Jul 8 14:26:50 2001 --- __init__.py Mon Dec 3 16:26:26 2001 *************** *** 476,483 **** --- 476,484 ---- self.activate() glPushMatrix() # Protect our matrix self.update_idletasks() + self.activate() w = self.winfo_width() h = self.winfo_height() glViewport(0, 0, w, h) If there is more than one Opengl widget, and all of them are exposed at once (say, when switching desktops), it is quite likely that the update_idletasks() call is going to result in tkExpose() being called for one of the other Opengl widgets. But this means that upon return from this call the active Opengl widget has changed. This caused glPopMatrix() to pop the wrong stack, which every time resulted in stack underflow, or worse. -- Maciej Kalisiak|mac@] "The real art of conversation is not only to say the dgp.toronto.edu|www.] right thing in the right place, but also to leave unsaid dgp.toronto.edu/~mac] the wrong thing at the tempting moment." |