Thanks, I never even heard of those functions but I can see from their
documentation that they could help. I've put them in the #else clause of
the #ifdef because they won't exist on Windows. So this will be in the
forthcoming release (RSN).
The glXWaitX documentation says that you could use XSync so if we need
something equivalent in the Tk world then it would probably be that. But
there is no real equivalent of a GL context in X (so, for example,
make_current_tk_handler() doesn't do anything).
Wayne
On Thu, 20 May 2010, Brian Smith wrote:
> Hi,
>
> We were having such a torid time with the dreaded
>
> X Error of failed request: GLXBadContext
>
> instant death on both 32 bit and 64 bit LINUX machines with NVidia graphics
> using NVidia drivers and OpenGL turned on in analysis that I have done a bit
> of digging as to what this was all about. I have always suspected that this
> was some kind of event timing problem and I found that the crash always
> happened in swap_buffers_gl_handler() in c/memops/global/gl_handler.c .
> Reading through the glX docs at
>
> http://pyopengl.sourceforge.net/documentation/manual-3.0/index.xhtml#GLX
>
> I saw that there are glXWaitGL() and glXWaitX() functions that ensure that
> all GL and X events are flushed before the next GL call goes through.
> Inserting
>
> glXWaitGL();
> glXWaitX();
>
> in make_current_gl_handler() in gl_handler.c just before the #ifdef WIN32
> seems to make analysis much more robust. I can even do crazy things like
> expanding the z scroll bar out with multiple 3Ds displayed, loads of contours
> and loads of assigned crosspeaks and then jump around! There does not seem to
> be a noticeable responsiveness penalty on my hardware.
>
> I don't know if there's a similar place in CCPN code that would help the
> analagous situation with a plain X equivalent when using Tk as the graphics
> handler?
>
> Brian
>
> --
> Dr. Brian O. Smith ---------------------- B Smith at bio gla ac uk
> Division of Molecular & Cellular Biology,
> Faculty of Biomedical & Life Sciences,
> Joseph Black Building, University of Glasgow, Glasgow G12 8QQ, UK.
> Tel: 0141 330 5167/6459/3089 Fax: 0141 330 4600
> -------------------------------------------------------------------
> The University of Glasgow, charity number SC004401
>
|