Psychtoolbox-3/Psychtoolbox-3 — pull request #99 by simonster (2013-01-24 03:24:28+00:00)
Title: Fix texture sharing on nVidia Windows systems

With the current PTB beta, on all of the Windows nVidia systems I tested, TextureSharingTest fails and I get a "wglShareLists for slaveWindow context failed" error. ATI machines seem to work fine. I dug into `PsychWindowGlue.c` and determined that reordering this code fixes the issue. My uninformed speculation is that nVidia cards cards don't like it when `windowRecord->targetSpecific.contextObject` is passed as the second argument to `wglShareLists` when it is already sharing display lists with another context.